OFFSET
0,4
FORMULA
G.f.: A(x) = (1 + 3*x - 2*x^2 - 6*x^3)/(1 + 2*x - 5*x^2 - 6*x^3 + 8*x^4). [corrected by Georg Fischer, Apr 17 2020]
3^n = Sum_{k=0..2*n} A027907(n, k)*a(k) for n>=0 and
5^n = Sum_{k=0..2*n} A027907(n, k)*a(k+1) for n>=0.
a(n) = (-1)^n*A006131(n-1) + (1/3)[(-2)^n + 2]. - Ralf Stephan, May 16 2007
EXAMPLE
3^3 = 1*(1) + 3*(1) + 6*(1) + 7*(3) + 6*(-3) + 3*(19) + 1*(-43).
5^3 = 1*(1) + 3*(1) + 6*(3) + 7*(-3) + 6*(19) + 3*(-43) + 1*(139).
In general, a sequence A with the property that the
trinomial transform of A gives powers of P, while the
trinomial transform of LSHIFT(A) gives powers of Q
has the g.f.: N(x)/D(x) where
N(x)=(1+3*x-(Q-3)*x^2-(P+Q-2)*x^3) and
D(x)=(1+2*x-(P+Q-3)*x^2-(P+Q-2)*x^3+(P-1)*(Q-1)*x^4).
MATHEMATICA
nn:=31; CoefficientList[Series[(1 + 3*x - 2*x^2 - 6*x^3)/(1 + 2*x - 5*x
^2 - 6*x^3 + 8*x^4), {x, 0, nn}], x] (* Georg Fischer, Apr 17 2020 *)
PROG
(PARI) {a(n)=local(P=3, Q=5, V=[1, 1]); if(n>1, for(m=1, n, V=concat(V, P^m-sum(k=0, 2*m-1, polcoeff((1+x+x^2)^m+x*O(x^k), k)*V[k+1])); V=concat(V, Q^m-sum(k=0, 2*m-1, polcoeff((1+x+x^2)^m+x*O(x^k), k)*V[k+2])); )); V[n+1]}
for(n=0, 30, print1(a(n), ", "))
CROSSREFS
KEYWORD
sign
AUTHOR
Paul D. Hanna, Dec 09 2004
STATUS
approved