OFFSET
0,2
COMMENTS
More generally, if g.f. A(x) satisfies: m^n-b^n = Sum_{k=0..n} [x^k]A(x)^n, then A(x) also satisfies: (m+z)^n - (b+z)^n + z^n = Sum_{k=0..n} [x^k](A(x)+z*x)^n for all z and A(x)=(1+(m-1)*x+sqrt(1+2*(m-2*b-1)*x+(m^2-2*m+4*b+1)*x^2))/2.
FORMULA
a(n) = -((2*n-3)*a(n-1) + 13*(n-3)*a(n-2))/n for n>2, with a(0)=1, a(1)=2, a(3)=3.
G.f.: (1+3*x + sqrt(1 + 2*x + 13*x^2))/2.
EXAMPLE
From the table of powers of A(x) (A100229), we see that
4^n-1 = Sum of coefficients [x^0] through [x^n] in A(x)^n:
A^1=[1,2],3,-3,-6,24,3,-183,273,...
A^2=[1,4,10],6,-15,6,75,-174,-276,...
A^3=[1,6,21,35],9,-36,63,72,-612,...
A^4=[1,8,36,92,118],12,-66,192,-147,...
A^5=[1,10,55,185,380,392],15,-105,420,...
A^6=[1,12,78,322,879,1506,1297],18,-153,...
MATHEMATICA
CoefficientList[Series[(1+3x+Sqrt[1+2x+13x^2])/2, {x, 0, 30}], x] (* or *) Join[{1}, RecurrenceTable[{a[1]==2, a[2]==3, a[n]==-((2n-3)a[n-1]+ 13(n-3)a[n-2])/n}, a, {n, 30}]] (* Harvey P. Dale, Feb 29 2012 *)
PROG
(PARI) {a(n) = if(n==0, 1, (4^n-1-sum(k=0, n, polcoeff(sum(j=0, min(k, n-1), a(j)*x^j)^n+x*O(x^k), k)))/n)}
for(n=0, 20, print1(a(n), ", "))
(PARI) {a(n) = if(n==0, 1, if(n==1, 2, if(n==2, 3, -((2*n-3)*a(n-1)+13*(n-3)*a(n-2))/n)))}
for(n=0, 30, print1(a(n), ", "))
(PARI) {a(n) = polcoeff((1+3*x+sqrt(1+2*x+13*x^2+x^2*O(x^n)))/2, n)}
for(n=0, 30, print1(a(n), ", "))
CROSSREFS
KEYWORD
sign
AUTHOR
Paul D. Hanna, Nov 29 2004
STATUS
approved