login
A216195
Abelian complexity function of the period-doubling sequence (A096268).
1
2, 2, 3, 2, 3, 3, 3, 2, 3, 3, 4, 3, 4, 3, 3, 2, 3, 3, 4, 3, 4, 4, 4, 3, 4, 4, 4, 3, 4, 3, 3, 2, 3, 3, 4, 3, 4, 4, 4, 3, 4, 4, 5, 4, 5, 4, 4, 3, 4, 4, 5, 4, 5, 4, 4, 3, 4, 4, 4, 3, 4, 3, 3, 2, 3, 3, 4, 3, 4, 4, 4, 3, 4, 4, 5, 4, 5, 4, 4, 3, 4, 4, 5, 4, 5, 5, 5, 4, 5, 5, 5, 4, 5, 4, 4, 3, 4, 4, 5
OFFSET
1,1
REFERENCES
Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. Mentions this sequence - see "List of Sequences" in Vol. 2.
FORMULA
a(1) = 2; a(2n) = a(n); a(4n-1) = a(n) + 1; a(4n+1) = a(n) + 1.
a(n) = A007302(n) + 1.
MATHEMATICA
a[n_]:=Count[BitXor[b1=IntegerDigits[n, 2]; b3=IntegerDigits[3*n, 2]; PadLeft[b1, Length[b3]], b3], 1]; Table[a[n] + 1, {n, 1, 100}] (* Vincenzo Librandi, Jan 13 2017 *)
CROSSREFS
Sequence in context: A070210 A100198 A164996 * A304333 A136510 A080071
KEYWORD
nonn,easy
AUTHOR
Nathan Fox, Mar 12 2013
STATUS
approved