OFFSET
0,2
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..90
FORMULA
G.f.: A(x) = Sum_{n>=0} x^n/(1-3^n*x).
EXAMPLE
A(x) = 1/(1-x) + x/(1-3x) + x^2/(1-9x) + x^3/(1-27x) + ...
= 1 + 2*x + 5*x^2 + 20*x^3 + 137*x^4 + 1622*x^5 + 33293*x^6 +...
MAPLE
seq( add(3^(k*(n-k)), k=0..n), n=0..30); # modified by G. C. Greubel, Jun 29 2021
MATHEMATICA
Table[Sum[3^(k*(n-k)), {k, 0, n}], {n, 0, 30}] (* G. C. Greubel, Jun 29 2021 *)
PROG
(PARI) a(n)=sum(k=0, n, (3^k)^(n-k) );
(Magma) [(&+[3^(k*(n-k)): k in [0..n]]): n in [0..30]]; // G. C. Greubel, Jun 29 2021
(Sage) [sum(3^(k*(n-k)) for k in (0..n)) for n in (0..30)] # G. C. Greubel, Jun 29 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Apr 15 2006
STATUS
approved