OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..5000 (first 257 terms from Antti Karttunen)
FORMULA
MAPLE
b:= proc(n) option remember; `if`(n=0, 1,
(t-> Bits[Xor](2^n*t, t))(b(n-1)))
end:
a:= n-> convert(Bits[Split](b(n)), `+`):
seq(a(n), n=0..71); # Alois P. Heinz, Mar 07 2024
MATHEMATICA
b[n_] := b[n] = If[n == 0, 1, With[{t = b[n-1]}, BitXor[2^n*t, t]]];
a[n_] := DigitCount[b[n], 2, 1];
Table[a[n], {n, 0, 100}] (* Jean-François Alcover, May 17 2024, after Alois P. Heinz *)
PROG
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 15 2017
STATUS
approved