[go: up one dir, main page]

login
A104976
Row sums of A104975.
2
1, 1, 0, 0, 1, 1, -1, -1, 2, 2, -2, -2, 4, 4, -6, -6, 9, 9, -13, -13, 21, 21, -31, -31, 47, 47, -71, -71, 109, 109, -165, -165, 250, 250, -380, -380, 578, 578, -876, -876, 1330, 1330, -2020, -2020, 3068, 3068, -4656, -4656, 7070, 7070, -10736, -10736, 16300, 16300, -24746, -24746, 37574, 37574, -57050, -57050
OFFSET
0,9
LINKS
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
Sequence in context: A071809 A347325 A324762 * A325710 A214927 A326115
KEYWORD
easy,sign
AUTHOR
Paul Barry, Mar 30 2005
STATUS
approved