login
A215488
a(0)=1, a(n) = a(n-1) + a(2*n AND n), where AND is the bitwise AND operator.
2
1, 2, 3, 6, 7, 8, 15, 30, 31, 32, 33, 36, 67, 98, 165, 330, 331, 332, 333, 336, 337, 338, 345, 360, 691, 1022, 1353, 1686, 2377, 3068, 5445, 10890, 10891, 10892, 10893, 10896, 10897, 10898, 10905, 10920, 10921, 10922, 10923, 10926, 10957, 10988, 11055, 11220, 22111, 33002
OFFSET
0,2
LINKS
MAPLE
f:= proc(n) option remember;
procname(n-1) + procname(Bits:-And(2*n, n))
end proc:
f(0):= 1:
seq(f(i), i=0..100); # Robert Israel, Dec 29 2016
PROG
(Python)
a = [1]*1000
for n in range(1, 777):
print a[n-1],
a[n]= a[n-1] + a[2*n & n]
CROSSREFS
Cf. A213370.
Sequence in context: A035346 A030164 A066646 * A110920 A296414 A267590
KEYWORD
nonn,base,easy
AUTHOR
Alex Ratushnyak, Aug 13 2012
STATUS
approved