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”).

A287051
a(0) = 0, a(1) = 1; a(2*n) = gpf(a(n)), a(2*n+1) = a(n) + a(n+1), where gpf(a(n)) is the greatest prime dividing a(n) for a(n) >= 2 and 1 if a(n) = 1 (A006530).
1
0, 1, 1, 2, 1, 3, 2, 3, 1, 4, 3, 5, 2, 5, 3, 4, 1, 5, 2, 7, 3, 8, 5, 7, 2, 7, 5, 8, 3, 7, 2, 5, 1, 6, 5, 7, 2, 9, 7, 10, 3, 11, 2, 13, 5, 12, 7, 9, 2, 9, 7, 12, 5, 13, 2, 11, 3, 10, 7, 9, 2, 7, 5, 6, 1, 7, 3, 11, 5, 12, 7, 9, 2, 11, 3, 16, 7, 17, 5, 13, 3, 14, 11, 13, 2, 15, 13, 18, 5, 17, 3, 19, 7, 16, 3, 11, 2, 11, 3, 16, 7
OFFSET
0,4
COMMENTS
A variation on Stern's diatomic sequence.
EXAMPLE
a(0) = 0;
a(1) = 1;
a(2) = a(2*1) = gpf(a(1)) = 1;
a(3) = a(2*1+1) = a(1) + a(2) = 2;
a(4) = a(2*2) = gpf(a(2)) = 1;
a(5) = a(2*2+1) = a(2) + a(3) = 3;
a(6) = a(2*3) = gpf(a(3)) = 2, etc.
MATHEMATICA
a[0] = 0; a[1] = 1; a[n_] := If[EvenQ[n], FactorInteger[a[n/2]][[-1, 1]], a[(n - 1)/2] + a[(n + 1)/2]]; Table[a[n], {n, 0, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, May 18 2017
STATUS
approved