OFFSET
0,1
COMMENTS
Old name was: Relates the squares of Pell numbers with the squares of the numerators of continued fraction convergents to sqrt(2).
Floretion Algebra Multiplication Program, FAMP Code: 1vesseq[(j' + k' + 'ii')*('j + 'k + 'ii')] - Creighton Dement, Aug 16 2005
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (5,5,-1).
FORMULA
G.f.: (5-x^2)/((1+x)*(1-6*x+x^2)).
a(n) = 5*a(n-1) + 5*a(n-2) - a(n-3), a(0) = 5, a(1) = 25, a(2) = 149. - Robert G. Wilson v, Nov 05 2004
2*a(n) = (-1)^n + 3*A001541(n+1). - R. J. Mathar, Sep 11 2019
MATHEMATICA
a[0]= 5; a[1]= 25; a[2]= 149; a[n_]:= a[n]= 5 a[n-1] + 5 a[n-2] - a[n-3]; Table[ a[n], {n, 0, 40}] (* Robert G. Wilson v, Nov 05 2004 *)
CoefficientList[Series[(5-x^2)/((1+x)(1-6x+x^2)), {x, 0, 40}], x] (* or *) LinearRecurrence[{5, 5, -1}, {5, 25, 149}, 40] (* Harvey P. Dale, Jun 09 2011 *)
PROG
(PARI) Vec((5-x^2)/((1+x)*(1-6*x+x^2))+O(x^99)) \\ Charles R Greathouse IV, Sep 27 2012
(Magma) I:=[5, 25, 149]; [n le 3 select I[n] else 5*Self(n-1)+5*Self(n-2)-Self(n-3): n in [1..40]]; // Vincenzo Librandi, Jul 26 2015
(SageMath)
def Pell(n): return lucas_number1(n, 2, -1)
[4*Pell(n+1)^2 +(Pell(n+1) +Pell(n))^2 for n in (0..40)] # G. C. Greubel, Aug 20 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Creighton Dement, Oct 25 2004
STATUS
approved