OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..125
FORMULA
G.f.: A(x) = Sum_{n>=0} x^n/(1-3^n*x^2).
a(2*n) = Sum_{k=0..n} (3^k)^(2*(n-k)).
a(2*n+1) = Sum_{k=0..n} (3^k)^(2*(n-k) +1).
EXAMPLE
A(x) = 1/(1-x^2) + x/(1-3x^2) + x^2/(1-9x^2) + x^3/(1-27x^2) +...
= 1 + x + 2*x^2 + 4*x^3 + 11*x^4 + 37*x^5 + 164*x^6 + 1000*x^7 +...
MATHEMATICA
Table[Sum[3^(k*(n-2*k)), {k, 0, Floor[n/2]}], {n, 0, 30}] (* G. C. Greubel, Jun 29 2021 *)
PROG
(PARI) a(n)=sum(k=0, n\2, (3^k)^(n-2*k) );
(Magma) [(&+[3^(k*(n-2*k)): k in [0..Floor(n/2)]]): n in [0..30]]; // G. C. Greubel, Jun 29 2021
(Sage) [sum(3^(k*(n-2*k)) for k in (0..n//2)) for n in (0..30)] # G. C. Greubel, Jun 29 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Apr 15 2006
STATUS
approved