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.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..10000
Nathan Fox, Python code to generate sequence
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
KEYWORD
nonn,easy
AUTHOR
Nathan Fox, Mar 12 2013
STATUS
approved