OFFSET
0,9
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
FORMULA
a(n) = Sum_{k=0..n} A104975(n, k).
G.f.: x^2/((1-x)*(Sum_{k>=1} x^(2^k))).
MATHEMATICA
t[n_, k_]:= t[n, k]= If[k==n, 1, ((1+(-1)^(n-k))/2)*Sum[Binomial[k, j]*t[(n-k)/2, j], {j, (n-k)/2}] ];
S[n_]:= Sum[(-1)^j*t[n, j], {j, 0, n}]; (* S = A104977 *)
a[n_]:= a[n]= Sum[If[EvenQ[n-k], S[(n-k)/2], 0], {k, 0, n}];
Table[a[n], {n, 0, 65}] (* G. C. Greubel, Jun 08 2021 *)
PROG
(Sage)
@CachedFunction
def t(n, k): return 1 if (k==n) else ((1+(-1)^(n-k))/2)*sum( binomial(k, j)*t((n-k)/2, j) for j in (1..(n-k)//2) )
def S(n): return sum( (-1)^j*t(n, j) for j in (0..n) ) # S = A104977
def T(n, k): return S((n-k)/2) if (mod(n-k, 2)==0) else 0 # T = A104975
def a(n): return sum( T(n, k) for k in (0..n) )
[a(n) for n in (0..65)] # G. C. Greubel, Jun 08 2021
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Paul Barry, Mar 30 2005
STATUS
approved