|
|
|
|
0, 0, 1, 1, 4, 5, 8, 9, 17, 21, 28, 33, 45, 53, 66, 75, 100, 117, 140, 161, 193, 221, 258, 291, 344, 389, 446, 499, 573, 639, 722, 797, 913, 1013, 1132, 1249, 1393, 1533, 1698, 1859, 2060, 2253, 2478, 2699, 2965, 3223, 3522, 3813, 4173, 4517, 4910, 5299, 5753
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,5
|
|
LINKS
|
|
|
FORMULA
|
Let b(0) = 1 and b(n) = b(n-1) + b(floor(n/2)) and let c(n) = Product_{i=0..k}(n_i+1) where n = Sum_{i=0..k}n_i*2^i is the binary representation of n. Then a(n) = (1/2)*(b(n) - c(n)).
|
|
MATHEMATICA
|
b[0] = 1; b[n_] := b[n] = b[Floor[n/2]] + b[n - 1];
c[n_] := Sum[Mod[Binomial[n, k], 2], {k, 0, n}];
a[n_] := (b[n] - c[n])/2;
|
|
PROG
|
(Sage)
def b(n):
A=[1]
for i in [1..n]:
A.append(A[i-1] + A[floor(i/2)])
return A[n]
[(b(n)-prod(x+1 for x in n.digits(2)))/2 for n in [0..60]]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|