OFFSET
0,2
LINKS
Paul D. Hanna, Table of n, a(n) for n = 0..1000
FORMULA
G.f.: 1 + Sum_{n>=1} x^n*(1 + x^(n-1))^n + x^(n^2)/(1 + x^(n+1))^n.
EXAMPLE
G.f.: A(x) = 1 + 3*x + x^2 + 2*x^3 + 3*x^4 + 5*x^5 + x^6 + 5*x^7 + x^8 + 9*x^9 + 10*x^10 + 6*x^11 + x^12 + 16*x^13 + x^14 + 8*x^15 + 23*x^16 +...
where A(x) = 1 + P(x) + N(x) with
P(x) = (x+x) + (x+x^2)^2 + (x+x^3)^3 + (x+x^4)^4 + (x+x^5)^5 + (x+x^6)^6 + (x+x^7)^7 +...+ (x+x^n)^n +...
N(x) = 1/(x+1/x) + 1/(x+1/x^2)^2 + 1/(x+1/x^3)^3 + 1/(x+1/x^4)^4 + 1/(x+1/x^5)^5 +...+ 1/(x+1/x^n)^n +...
Explicitly,
P(x) = 2*x + x^2 + 3*x^3 + 2*x^4 + 4*x^5 + x^6 + 8*x^7 + x^8 + 7*x^9 + 7*x^10 + 7*x^11 + x^12 + 22*x^13 + x^14 + 9*x^15 + 17*x^16 +...
N(x) = x - x^3 + x^4 + x^5 - 3*x^7 + 2*x^9 + 3*x^10 - x^11 - 6*x^13 - x^15 + 6*x^16 + 7*x^17 - 7*x^19 - 13*x^21 + 7*x^22 - x^23 +...
PROG
(PARI) {a(n) = local(A=1); A = sum(k=-n, n, (x+x^k)^k +x*O(x^n)); polcoeff(A, n)}
for(n=0, 100, print1(a(n), ", "))
(PARI) {a(n) = local(A=1); A = 1 + sum(k=1, n, x^k*(1+x^(k-1))^k + x^(k^2)/(1+x^(k+1))^k +x*O(x^n)); polcoeff(A, n)}
for(n=0, 100, print1(a(n), ", "))
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Jul 16 2015
STATUS
approved