OFFSET
1,2
COMMENTS
The corresponding values of y of this Pell equation are in A176378.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..200
Index entries for linear recurrences with constant coefficients, signature (502,-1).
FORMULA
a(n) = 502*a(n-1)-a(n-2) with a(1)=1, a(2)=251.
G.f.: x*(1-251*x)/(1-502*x+x^2). - Harvey P. Dale, Jun 14 2011
MATHEMATICA
LinearRecurrence[{502, -1}, {1, 251}, 20] (* Harvey P. Dale, Jun 14 2011 *)
(* Alternative: *)
CoefficientList[ Series[ (1-251 x)/(1-502 x+x^2), {x, 0, 20}], x] (* Harvey P. Dale, Jun 14 2011 *)
PROG
(PARI) Vec((1-251*x)/(1-502*x+x^2)+O(x^99)) \\ Charles R Greathouse IV, Jun 14 2011
(Magma) I:=[1, 251]; [n le 2 select I[n] else 502*Self(n-1)-Self(n-2): n in [1..20]];
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
Vincenzo Librandi, Apr 16 2010
EXTENSIONS
Definition rewritten and g.f. adapted to the offset from Bruno Berselli, Dec 15 2011
STATUS
approved
