login
A295514
a(n) = 2^bil(n) - bil(n) where bil(0) = 0 and bil(n) = floor(log_2(n)) + 1 for n > 0.
1
1, 1, 2, 2, 5, 5, 5, 5, 12, 12, 12, 12, 12, 12, 12, 12, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 121, 121, 121
OFFSET
0,3
LINKS
FORMULA
From Robert Israel, Dec 03 2017: (Start)
G.f. (1-x)^(-1)*(1+Sum_{k>=0} (2^k-1)*x^(2^k)).
a(n) = 4*a(floor(n/2)) - 5*a(floor(n/4)) + 2*a(floor(n/8)) for n >= 4. (End)
MAPLE
1, seq((2^k-k)$(2^(k-1)), k=1..8); # Robert Israel, Dec 03 2017
MATHEMATICA
a[n_] := 2^IntegerLength[n, 2] - IntegerLength[n, 2];
Table[a[n], {n, 0, 58}]
CROSSREFS
Cf. A000325.
Sequence in context: A280511 A200997 A063960 * A025510 A350172 A356387
KEYWORD
nonn
AUTHOR
Peter Luschny, Dec 02 2017
STATUS
approved