login
A285742
a(0) = 0, a(1) = 1; a(2*n) = prime(a(n)), a(2*n+1) = prime(a(n)) + prime(a(n+1)).
1
0, 1, 2, 5, 3, 14, 11, 16, 5, 48, 43, 74, 31, 84, 53, 64, 11, 234, 223, 414, 191, 564, 373, 500, 127, 560, 433, 674, 241, 552, 311, 342, 31, 1512, 1481, 2890, 1409, 4260, 2851, 4004, 1153, 5246, 4093, 6642, 2549, 6120, 3571, 4280, 709, 4766, 4057, 7076, 3019, 8042, 5023, 6546, 1523, 5526, 4003, 6066, 2063
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)) + prime(a(2)) = prime(1) + prime(2) = 2 + 3 = 5;
a(4) = a(2*2) = prime(a(2)) = prime(2) = 3;
a(5) = a(2*2+1) = prime(a(2)) + prime(a(3)) = prime(2) + prime(5) = 3 + 11 = 14, etc.
MATHEMATICA
a[0] = 0; a[1] = 1; a[n_] := If[EvenQ[n], Prime[a[n/2]], Prime[a[(n - 1)/2]] + Prime[a[(n + 1)/2]]]; Table[a[n], {n, 0, 60}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Apr 25 2017
STATUS
approved