login
A026513
a(n) = t(2+3n), where t = A001285 (Thue-Morse sequence).
4
2, 1, 2, 2, 2, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 1, 1, 2, 1
OFFSET
0,1
LINKS
MATHEMATICA
Array[1 + Mod[DigitCount[3 # + 2, 2, 1], 2] &, 105, 0] (* Michael De Vlieger, Oct 06 2019 *)
Table[ThueMorse[2+3n], {n, 0, 100}]+1 (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Nov 29 2020 *)
PROG
(PARI) a(n)=1+hammingweight(3*n+2)%2 \\ Charles R Greathouse IV, May 09 2016
CROSSREFS
KEYWORD
nonn
EXTENSIONS
Name and Pari adapted to match offset in A001285 by Sean A. Irvine, Oct 05 2019
STATUS
approved