OFFSET
0,2
COMMENTS
Essentially the same as A046727.
Consider the finite continued fraction 2 + 1/(2 + 1/(2 + ...)) with 2*n 2's, but the middle numerator is -1 instead of 1. This continued fraction is equal to a(n)/(2*P(n)^2) for P(n) = A000129(n), the n-th Pell number. For example, when n=2, our continued fraction would be 2 + 1/(2 + (-1)/(2 + 1/2)) = 21/8, which is a(2)/(2*P(2)^2). - Greg Dresden and Jiaqian Zhang, Sep 11 2025
REFERENCES
Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See Table 60 at p. 123.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
P. E. Trier, "Almost Isosceles" Right-Angled Triangles, Eureka, No. 4, May 1940, pp. 9 - 11.
Index entries for linear recurrences with constant coefficients, signature (5,5,-1).
FORMULA
a(n) = ((sqrt(2)+1)^(2*n+1) - (sqrt(2)-1)^(2*n+1) + 2*(-1)^n)/4.
a(n) = 5*a(n-1) + 5*a(n-2) - a(n-3). - Paul Curtz, May 17 2008
G.f.: (1-x)^2/((1+x)*(1-6*x+x^2)). - R. J. Mathar, Sep 17 2008
From Peter Bala, May 01 2012: (Start)
a(n) = (-1)^n*R(n,-4), where R(n,x) is the n-th row polynomial of A211955.
a(n) = (-1)^n*1/u*T(n,u)*T(n+1,u) with u = sqrt(-1) and T(n,x) the Chebyshev polynomial of the first kind.
a(n) = (-1)^n + 4*Sum_{k = 1..n} (-1)^(n-k)*8^(k-1)*binomial(n+k,2*k).
Recurrence equations: a(n) = 6*a(n-1) - a(n-2) + 4*(-1)^n, with a(0) = 1 and a(1) = 3; a(n)*a(n-2) = a(n-1)*(a(n-1)+4*(-1)^n).
Sum_{k >= 0} (-1)^k/a(k) = 1/sqrt(2).
1 - 2*(Sum_{k = 0..n} (-1)^k/a(k))^2 = (-1)^(n+1)/A090390(n+1). (End)
a(n) = (A001333(2*n+1) + (-1)^n)/2. - G. C. Greubel, Oct 11 2022
E.g.f.: exp(-x)*(1 + exp(4*x)*(cosh(2*sqrt(2)*x) + sqrt(2)*sinh(2*sqrt(2)*x)))/2. - Stefano Spezia, Aug 03 2024
MATHEMATICA
b[n_]:= Numerator[FromContinuedFraction[ContinuedFraction[Sqrt[2], n]]];
Join[{1}, Table[b[n+1], {n, 50}]*Table[b[n], {n, 50}]] (* Vladimir Joseph Stephan Orlovsky, Jan 15 2011 *)
LinearRecurrence[{5, 5, -1}, {1, 3, 21}, 30] (* Harvey P. Dale, Aug 04 2019 *)
PROG
(Magma) [Floor(((Sqrt(2)+1)^(2*n+1)-(Sqrt(2)-1)^(2*n+1)+2*(-1)^n)/4): n in [0..30]]; // Vincenzo Librandi, Aug 13 2011
(SageMath) [(lucas_number2(2*n+1, 2, -1) + 2*(-1)^n)/4 for n in range(31)] # G. C. Greubel, Oct 11 2022
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, May 18 2003
STATUS
approved
