login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A285743
a(0) = 0, a(1) = 1; a(2*n) = prime(a(n)), a(2*n+1) = prime(a(n)+a(n+1)).
2
0, 1, 2, 5, 3, 17, 11, 19, 5, 71, 59, 107, 31, 113, 67, 89, 11, 383, 353, 733, 277, 983, 587, 787, 127, 827, 617, 1069, 331, 911, 461, 541, 31, 2707, 2647, 5573, 2381, 8713, 5557, 8017, 1787, 10271, 7753, 13187, 4273, 11383, 6037, 7129, 709, 7529, 6353, 12049, 4549, 14389, 8581, 11657, 2221, 10111, 7109, 11353, 3259
OFFSET
0,3
COMMENTS
A variation on Stern's diatomic sequence (A002487) and primeth recurrence (A007097).
EXAMPLE
a(0) = 0;
a(1) = 1;
a(2) = a(2*1) = prime(a(1)) = prime(1) = 2;
a(3) = a(2*1+1) = prime(a(1)+a(2)) = prime(3) = 5;
a(4) = a(2*2) = prime(a(2)) = prime(2) = 3;
a(5) = a(2*2+1) = prime(a(2)+a(3)) = prime(7) = 17, etc.
MAPLE
A[0]:= 0: A[1]:= 1:
for n from 1 to 50 do
A[2*n]:= ithprime(A[n]);
A[2*n+1]:= ithprime(A[n]+A[n+1]);
od:
seq(A[i], i=0..101); # Robert Israel, Apr 25 2017
MATHEMATICA
a[0] = 0; a[1] = 1; a[n_] := If[EvenQ[n], Prime[a[n/2]], Prime[a[(n - 1)/2] + a[(n + 1)/2]]]; Table[a[n], {n, 0, 60}]
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Ilya Gutkovskiy, Apr 25 2017
STATUS
approved