OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
FORMULA
a(n) = Sum_{k=0..n} (-1)^(n-k) * 4^k * A051731(n+1, k+1).
a(n) = (-1)^n * Sum_{d|n+1} (-4)^(d-1). - G. C. Greubel, Jun 25 2024
MATHEMATICA
A101562[n_]:= (-1)^n*DivisorSum[n+1, (-4)^(#-1) &];
Table[A101562[n], {n, 0, 40}] (* G. C. Greubel, Jun 25 2024 *)
PROG
(Magma)
A101562:= func< n | (&+[(-1)^(n-k)*4^k*0^((n+1) mod (k+1)): k in [0..n]]) >;
[A101562(n): n in [0..40]]; // G. C. Greubel, Jun 25 2024
(SageMath)
def A101562(n): return sum((-1)^(n+k)*4^k*0^((n+1)%(k+1)) for k in range(n+1))
[A101562(n) for n in range(41)] # G. C. Greubel, Jun 25 2024
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Dec 07 2004
STATUS
approved