Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A123196
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A123196 Jumping along the natural numbers, starting at the first prime, and letting the greatest prime reached so far determine the length of the next jump, when "reached" is defined as "jumped over" as well as "landed on". +0
1
2, 4, 7, 14, 27, 50, 97, 194, 387, 770, 1539, 3070, 6137, 12270, 24539, 49072, 98141, 196270, 392517, 785020, 1570037, 3140044, 6280085, 12560152, 25120299, 50240588, 100481175, 200962342, 401924669, 803849308, 1607698611, 3215397194 (list; graph; listen)
OFFSET

1,1

COMMENT

Note that the infinitude of this sequence follows from Bertrand's postulate.

Note that among the first 500 terms, the only incidences of landing on a prime are a(1)=2, a(3)=7, a(7)=97, a(107)=121474271192355984857330583869867, a(131)=2038000086236733906844164388990328913223, a(213)=9855163698513713909085801671402005891971064843855880862395143513, a(263)=11095927890075400286247016316695675869545111875133467483507108736140473279275923, and a(363)=14065759649943232199503687383855856505936224132395415510409767659858832609720674451927788900894656558117637349.

EXAMPLE

a(1)=2 since 2 is the first prime. a(3)=7 since having landed at 4, the greatest prime reached so far is 3. a(8)=194=97+97 since with the preceding term we had landed on a prime. a(17)=98141 since having passed the prime 49069 with the term a(16) but not having reached the prime 49081, we have to add the former and indeed 98141=49069+49072.

MAPLE

a[1]:=2; for k from 1 to 29 do x:=a[k]: if isprime(x) then a[k+1]:=x+x: else y:=x: while not(isprime(y)) do y:=y-1:od; a[k+1]:= x+y: fi; od;

CROSSREFS

Adjacent sequences: A123193 A123194 A123195 this_sequence A123197 A123198 A123199

Sequence in context: A052535 A027988 A005594 this_sequence A079968 A001631 A108758

KEYWORD

easy,nonn

AUTHOR

Peter C. Heinig (algorithms(AT)gmx.de), Oct 04 2006

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified May 16 01:24 EDT 2008. Contains 139630 sequences.


AT&T Labs Research