How to create geometric progression series in R? (2024)

How to create geometric progression series in R? (1)

  • Data Structure
  • Networking
  • RDBMS
  • Operating System
  • Java
  • MS Excel
  • iOS
  • HTML
  • CSS
  • Android
  • Python
  • C Programming
  • C++
  • C#
  • MongoDB
  • MySQL
  • Javascript
  • PHP
  • Physics
  • Chemistry
  • Biology
  • Mathematics
  • English
  • Economics
  • Psychology
  • Social Studies
  • Fashion Studies
  • Legal Studies
  • Selected Reading
  • UPSC IAS Exams Notes
  • Developer's Best Practices
  • Questions and Answers
  • Effective Resume Writing
  • HR Interview Questions
  • Computer Glossary
  • Who is Who

'; var adpushup = adpushup || {}; adpushup.que = adpushup.que || []; adpushup.que.push(function() { adpushup.triggerAd(ad_id); });

A geometric progression series is a sequence of numbers in which all the numbers after the first can be found by multiplying the previous one by a fixed number. To generate a geometric progression series in R, we can use seq function. For example, to generate a geometric progression series of 2 by having the difference of multiplication value equal to 1 up to 5 can be found as 2^seq(0,5,by=1) and the output would be 1, 2, 4, 8, 16, 32.

Examples

2^seq(0,5,by=1)[1] 1 2 4 8 16 322^seq(0,5,by=2)[1] 1 4 162^seq(0,10,by=1)[1] 1 2 4 8 16 32 64 128 256 512 10242^seq(0,10,by=2)[1] 1 4 16 64 256 10242^seq(0,20,by=1)[1] 1 2 4 8 16 32 64 128 256[10] 512 1024 2048 4096 8192 16384 32768 65536 131072[19] 262144 524288 10485762^seq(0,20,by=2)[1] 1 4 16 64 256 1024 4096 16384 65536[10] 262144 10485762^seq(0,30,by=1)[1] 1 2 4 8 16 32[7] 64 128 256 512 1024 2048[13] 4096 8192 16384 32768 65536 131072[19] 262144 524288 1048576 2097152 4194304 8388608[25] 16777216 33554432 67108864 134217728 268435456 536870912[31] 10737418242^seq(0,30,by=2)[1] 1 4 16 64 256 1024[7] 4096 16384 65536 262144 1048576 4194304[13] 16777216 67108864 268435456 10737418242^seq(0,30,by=5)[1] 1 32 1024 32768 1048576 33554432 10737418242^seq(0,35,by=1)[1] 1 2 4 8 16 32[7] 64 128 256 512 1024 2048[13] 4096 8192 16384 32768 65536 131072[19] 262144 524288 1048576 2097152 4194304 8388608[25] 16777216 33554432 67108864 134217728 268435456 536870912[31] 1073741824 2147483648 4294967296 8589934592 17179869184 343597383682^seq(0,35,by=5)[1] 1 32 1024 32768 1048576 33554432[7] 1073741824 343597383682^seq(0,35,by=7)[1] 1 128 16384 2097152 268435456 343597383682^seq(0,39,by=1)[1] 1 2 4 8 16[6] 32 64 128 256 512[11] 1024 2048 4096 8192 16384[16] 32768 65536 131072 262144 524288[21] 1048576 2097152 4194304 8388608 16777216[26] 33554432 67108864 134217728 268435456 536870912[31] 1073741824 2147483648 4294967296 8589934592 17179869184[36] 34359738368 68719476736 137438953472 274877906944 5497558138882^seq(0,100,by=1)[1] 1.000000e+00 2.000000e+00 4.000000e+00 8.000000e+00 1.600000e+01[6] 3.200000e+01 6.400000e+01 1.280000e+02 2.560000e+02 5.120000e+02[11] 1.024000e+03 2.048000e+03 4.096000e+03 8.192000e+03 1.638400e+04[16] 3.276800e+04 6.553600e+04 1.310720e+05 2.621440e+05 5.242880e+05[21] 1.048576e+06 2.097152e+06 4.194304e+06 8.388608e+06 1.677722e+07[26] 3.355443e+07 6.710886e+07 1.342177e+08 2.684355e+08 5.368709e+08[31] 1.073742e+09 2.147484e+09 4.294967e+09 8.589935e+09 1.717987e+10[36] 3.435974e+10 6.871948e+10 1.374390e+11 2.748779e+11 5.497558e+11[41] 1.099512e+12 2.199023e+12 4.398047e+12 8.796093e+12 1.759219e+13[46] 3.518437e+13 7.036874e+13 1.407375e+14 2.814750e+14 5.629500e+14[51] 1.125900e+15 2.251800e+15 4.503600e+15 9.007199e+15 1.801440e+16[56] 3.602880e+16 7.205759e+16 1.441152e+17 2.882304e+17 5.764608e+17[61] 1.152922e+18 2.305843e+18 4.611686e+18 9.223372e+18 1.844674e+19[66] 3.689349e+19 7.378698e+19 1.475740e+20 2.951479e+20 5.902958e+20[71] 1.180592e+21 2.361183e+21 4.722366e+21 9.444733e+21 1.888947e+22[76] 3.777893e+22 7.555786e+22 1.511157e+23 3.022315e+23 6.044629e+23[81] 1.208926e+24 2.417852e+24 4.835703e+24 9.671407e+24 1.934281e+25[86] 3.868563e+25 7.737125e+25 1.547425e+26 3.094850e+26 6.189700e+26[91] 1.237940e+27 2.475880e+27 4.951760e+27 9.903520e+27 1.980704e+28[96] 3.961408e+28 7.922816e+28 1.584563e+29 3.169127e+29 6.338253e+29[101] 1.267651e+302^seq(0,100,by=2)[1] 1.000000e+00 4.000000e+00 1.600000e+01 6.400000e+01 2.560000e+02[6] 1.024000e+03 4.096000e+03 1.638400e+04 6.553600e+04 2.621440e+05[11] 1.048576e+06 4.194304e+06 1.677722e+07 6.710886e+07 2.684355e+08[16] 1.073742e+09 4.294967e+09 1.717987e+10 6.871948e+10 2.748779e+11[21] 1.099512e+12 4.398047e+12 1.759219e+13 7.036874e+13 2.814750e+14[26] 1.125900e+15 4.503600e+15 1.801440e+16 7.205759e+16 2.882304e+17[31] 1.152922e+18 4.611686e+18 1.844674e+19 7.378698e+19 2.951479e+20[36] 1.180592e+21 4.722366e+21 1.888947e+22 7.555786e+22 3.022315e+23[41] 1.208926e+24 4.835703e+24 1.934281e+25 7.737125e+25 3.094850e+26[46] 1.237940e+27 4.951760e+27 1.980704e+28 7.922816e+28 3.169127e+29[51] 1.267651e+302^seq(0,100,by=4)[1] 1.000000e+00 1.600000e+01 2.560000e+02 4.096000e+03 6.553600e+04[6] 1.048576e+06 1.677722e+07 2.684355e+08 4.294967e+09 6.871948e+10[11] 1.099512e+12 1.759219e+13 2.814750e+14 4.503600e+15 7.205759e+16[16] 1.152922e+18 1.844674e+19 2.951479e+20 4.722366e+21 7.555786e+22[21] 1.208926e+24 1.934281e+25 3.094850e+26 4.951760e+27 7.922816e+28[26] 1.267651e+302^seq(0,100,by=5)[1] 1.000000e+00 3.200000e+01 1.024000e+03 3.276800e+04 1.048576e+06[6] 3.355443e+07 1.073742e+09 3.435974e+10 1.099512e+12 3.518437e+13[11] 1.125900e+15 3.602880e+16 1.152922e+18 3.689349e+19 1.180592e+21[16] 3.777893e+22 1.208926e+24 3.868563e+25 1.237940e+27 3.961408e+28[21] 1.267651e+30

Nizamuddin Siddiqui

Updated on: 07-Nov-2020

1K+ Views

Related Articles

  • C Program for N-th term of Geometric Progression series
  • C program to compute geometric progression
  • Find the missing number in Geometric Progression in C++
  • Return numbers spaced evenly on a geometric progression in Numpy
  • Removing a Number from Array to make It Geometric Progression using C++
  • Find all triplets in a sorted array that forms Geometric Progression in C++
  • Program for sum of geometric series in C
  • How to create a time series plot in R without time vector?
  • Return numbers spaced evenly on a geometric progression but with negative inputs in Numpy
  • Return numbers spaced evenly on a geometric progression but with complex inputs in Numpy
  • C program to find the sum of arithmetic progression series
  • Return evenly spaced numbers on a geometric progression and set the number of samples to generate in Numpy
  • Return evenly spaced numbers on a geometric progression and do not set the endpoint in Numpy
  • How to create a vertical line in a time series plot in base R?\n
  • JavaScript code to find nth term of a series - Arithmetic Progression (AP)
Kickstart Your Career

Get certified by completing the course

Get Started

How to create geometric progression series in R? (31)

Advertisem*nts

';adpushup.triggerAd(ad_id); });

How to create geometric progression series in R? (2024)

References

Top Articles
Latest Posts
Article information

Author: Duncan Muller

Last Updated:

Views: 5797

Rating: 4.9 / 5 (59 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Duncan Muller

Birthday: 1997-01-13

Address: Apt. 505 914 Phillip Crossroad, O'Konborough, NV 62411

Phone: +8555305800947

Job: Construction Agent

Hobby: Shopping, Table tennis, Snowboarding, Rafting, Motor sports, Homebrewing, Taxidermy

Introduction: My name is Duncan Muller, I am a enchanting, good, gentle, modern, tasty, nice, elegant person who loves writing and wants to share my knowledge and understanding with you.