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

A159782
a(0)=1; a(1)=a(2)=a(3)=a(4)=2; a(2n+1)=0 for n >= 2; a(4n)=a(4n-2) = a(n) + a(n+1) for n >= 2.
2
1, 2, 2, 2, 2, 0, 4, 0, 4, 0, 4, 0, 4, 0, 2, 0, 2, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4
OFFSET
0,2
COMMENTS
a(n) = {0, 1, 2 or 4}. - Robert G. Wilson v, May 27 2009
Also the number of palindromes of length n in the Thue-Morse sequence (A010060). - Jeffrey Shallit, Feb 19 2013
LINKS
A. Blondin-Massé, S. Brlek, A. Garon, and S. Labbé, Combinatorial properties of f-palindromes in the Thue-Morse Sequence, Pure. Math. Appl., 19 (2-3) (2008), 39-52.
MATHEMATICA
f[n_] := f[n]= Switch[ Mod[n, 4], 0, f[n/4] + f[n/4 + 1], 1, 0, 2, f[(n + 2)/4] + f[(n + 6)/4], 3, 0]; f[0] = 1; f[1] = f[2] = f[3] = f[4] = 2; Table[f@n, {n, 0, 104}] (* Robert G. Wilson v, May 27 2009 *)
CROSSREFS
Cf. A010060.
Sequence in context: A241477 A362485 A268243 * A268242 A362932 A309509
KEYWORD
easy,nonn
AUTHOR
Philippe Deléham, Apr 22 2009
EXTENSIONS
More terms from Robert G. Wilson v, May 27 2009
STATUS
approved