OFFSET
0,1
LINKS
Colin Barker, Table of n, a(n) for n = 0..900
J.-P. Ehrmann et al., Problem POLYA002, Integer pairs (x,y) for which (x^2+y^2)/(1+pxy) is an integer.
Index entries for linear recurrences with constant coefficients, signature (13,-13,1).
FORMULA
a(n) = 2*t(m)*a(n-1)-a(n-2)-1, a(0) = m, a(1) = m^3+m^2-1 with m = 3.
G.f.: (4*x-3) / ((1-12*x+x^2)(x-1)).
a(0)=3, a(1)=35, a(2)=416, a(n) = 13*a(n-1)-13*a(n-2)+a(n-3). - Harvey P. Dale, Mar 23 2012
a(n) = (2+(29-5*sqrt(35))*(6-sqrt(35))^n+(6+sqrt(35))^n*(29+5*sqrt(35)))/20. - Colin Barker, Mar 05 2016
MAPLE
g := (4*x-3)/(1-12*x+x^2)/(x-1): s := series(g, x, 40): for i from 0 to 30 do printf(`%d, `, coeff(s, x, i)) od: # James A. Sellers, Feb 11 2002
MATHEMATICA
CoefficientList[Series[(4x-3)/((1-12x+x^2)(x-1)), {x, 0, 30}], x] (* or *) LinearRecurrence[{13, -13, 1}, {3, 35, 416}, 30] (* Harvey P. Dale, Mar 23 2012 *)
PROG
(PARI) Vec((4*x-3)/((1-12*x+x^2)*(x-1)) + O(x^25)) \\ Colin Barker, Mar 05 2016
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Floor van Lamoen, Nov 29 2001
EXTENSIONS
More terms from James A. Sellers, Feb 11 2002
STATUS
approved