OFFSET
1,2
COMMENTS
The rule "jump over next something" can be varied. In A074487 the example "jump over next square" is given.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
a(1)=1, a(n) = 2 nextprime(a(n-1))-a(n-1).
EXAMPLE
a(1)=1; next prime (smallest larger than a(1))=2; "jump over" it: 2+(2-1)=3; a(2)=3; next prime (smallest larger than a(2))=5; "jump over" it: 5+(5-3)=7; a(7)=31; next prime (smallest larger than a(7))=37; "jump over" it: 37+(37-31)=43.
MAPLE
A:= Vector(100):
A[1]:= 1:
for n from 2 to 100 do A[n]:= 2*nextprime(A[n-1])-A[n-1] od:
convert(A, list); # Robert Israel, Dec 01 2020
MATHEMATICA
NestList[2*NextPrime[#]-#&, 1, 60] (* Harvey P. Dale, Aug 22 2022 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Zak Seidov, Sep 26 2002
STATUS
approved