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).
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
Keywords
Examples
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.
Links
- Michael Gilleland, Some Self-Similar Integer Sequences
- Eric Weisstein's World of Mathematics, Greatest Prime Factor
- Eric Weisstein's World of Mathematics, Stern's Diatomic Series
- Index entries for sequences related to Stern's sequences
Programs
-
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}]
Comments