OFFSET
1,1
LINKS
Vaclav Kotesovec, Table of n, a(n) for n = 1..1000
FORMULA
G.f.: Sum_{n>=1} x^n * (2 + x^n) / (1 - 2*x^n - x^(2*n)).
G.f.: Sum_{n>=1} x^n * Sum_{d|n} (2 + x^d)^(n/d).
a(2*n^2) == 1 (mod 2), with a(n) == 0 (mod 2) elsewhere.
a(n) ~ (1+sqrt(2))^(n+1) / (2*sqrt(2)). - Vaclav Kotesovec, Jun 02 2015
EXAMPLE
G.f.: A(x) = 2*x + 7*x^2 + 14*x^3 + 36*x^4 + 72*x^5 + 188*x^6 +...
where by definition
A(x) = 2*x/(1-x) + 5*x^2/(1-x^2) + 12*x^3/(1-x^3) + 29*x^4/(1-x^4) + 70*x^5/(1-x^5) + 169*x^6/(1-x^6) + 408*x^7/(1-x^7) + 985*x^8/(1-x^8) + 2378*x^9/(1-x^9) + 5741*x^10/(1-x^10) +...+ Pell(n+1)*x^n/(1-x^n) +...
The g.f. is also given by the series identity:
A(x) = x*(2+x)/(1-2*x-x^2) + x^2*(2+x^2)/(1-2*x^2-x^4) + x^3*(2+x^3)/(1-2*x^3-x^6) + x^4*(2+x^4)/(1-2*x^4-x^8) + x^5*(2+x^5)/(1-2*x^5-x^10) + x^6*(2+x^6)/(1-2*x^6-x^12) + x^7*(2+x^7)/(1-2*x^7-x^14) +...+ x^n*(1+x^n)/(1-x^n-x^(2*n)) +...
And also we have the series:
A(x) = x*(2 + x) + x^2*((2+x)^2 + (2+x^2)) + x^3*((2+x)^3 + (2+x^3))
+ x^4*((2+x)^4 + (2+x^2)^2 + (2+x^4)) + x^5*((2+x)^5 + (2+x^5))
+ x^6*((2+x)^6 + (2+x^2)^3 + (2+x^3)^2 + (2+x^6))
+ x^7*((2+x)^7 + (2+x^7))
+ x^8*((2+x)^8 + (2+x^2)^4 + (2+x^4)^2 + (2+x^8))
+ x^9*((2+x)^9 + (2+x^3)^3 + (2+x^9))
+ x^10*((2+x)^10 + (2+x^2)^5 + (2+x^5)^2 + (2+x^10))
+ x^11*((2+x)^11 + (2+x^11))
+ x^12*((2+x)^12 + (2+x^2)^6 + (2+x^3)^4 + (2+x^4)^3 + (2+x^6)^2 + (2+x^12))
+...+ x^n * Sum_{d|n} (2 + x^d)^(n/d) +...
or, more explicitly,
A(x) = x*(2 + x) + x^2*(6 + 4*x + 2*x^2)
+ x^3*(10 + 12*x + 6*x^2 + 2*x^3)
+ x^4*(22 + 32*x + 28*x^2 + 8*x^3 + 3*x^4)
+ x^5*(34 + 80*x + 80*x^2 + 40*x^3 + 10*x^4 + 2*x^5)
+ x^6*(78 + 192*x + 252*x^2 + 164*x^3 + 66*x^4 + 12*x^5 + 4*x^6)
+ x^7*(130 + 448*x + 672*x^2 + 560*x^3 + 280*x^4 + 84*x^5 + 14*x^6 + 2*x^7)
+ x^8*(278 + 1024*x + 1824*x^2 + 1792*x^3 + 1148*x^4 + 448*x^5 + 120*x^6 + 16*x^7 + 4*x^8)
+ x^9*(522 + 2304*x + 4608*x^2 + 5388*x^3 + 4032*x^4 + 2016*x^5 + 678*x^6 + 144*x^7 + 18*x^8 + 3*x^9) +...
MATHEMATICA
a[n_] := SeriesCoefficient[Sum[(x^k*(2+x^k))/(1-2*x^k-x^(2*k)), {k, 1, n}], {x, 0, n}]; Array[a, 40] (* Jean-François Alcover, Dec 19 2015 *)
PROG
(PARI) {Pell(n)=polcoeff(x/(1-2*x-x^2 +x*O(x^n)), n)}
{a(n)=polcoeff(sum(m=1, n, Pell(m+1)*x^m/(1-x^m +x*O(x^n))), n)}
for(n=1, 40, print1(a(n), ", "))
(PARI) {a(n)=polcoeff(sum(m=1, n, x^m*(2+x^m)/(1-2*x^m-x^(2*m) +x*O(x^n)) ), n)}
for(n=1, 40, print1(a(n), ", "))
(PARI) {a(n)=local(A=x+x^2); A=sum(m=1, n, x^m*sumdiv(m, d, (2 + x^(m/d) +x*O(x^n))^d) ); polcoeff(A, n)}
for(n=1, 40, print1(a(n), ", "))
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Jun 01 2015
STATUS
approved