|
|
A048654
|
|
a(n) = 2*a(n-1) + a(n-2); a(0)=1, a(1)=4.
|
|
30
|
|
|
1, 4, 9, 22, 53, 128, 309, 746, 1801, 4348, 10497, 25342, 61181, 147704, 356589, 860882, 2078353, 5017588, 12113529, 29244646, 70602821, 170450288, 411503397, 993457082, 2398417561, 5790292204
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
Generalized Pellian with second term equal to 4.
The generalized Pellian with second term equal to s has the terms a(n) = A000129(n)*s + A000129(n-1). The generating function is -(1+s*x-2*x)/(-1+2*x+x^2). - R. J. Mathar, Nov 22 2007
|
|
LINKS
|
A. F. Horadam, Pell Identities, Fib. Quart., Vol. 9, No. 3, 1971, pp. 245-252.
|
|
FORMULA
|
a(n) = ((3+sqrt(2))*(1+sqrt(2))^n - (3-sqrt(2))*(1-sqrt(2))^n)/2*sqrt(2).
a(n) = binomial transform of 1, 3, 2, 6, 4, 12, ... . - Al Hakanson (hawkuu(AT)gmail.com), Aug 08 2009
E.g.f.: exp(x)*cosh(sqrt(2)*x) + 3*exp(x)*sinh(sqrt(2)*x)/sqrt(2). - Vaclav Kotesovec, Feb 16 2015
a(n) is the denominator of the continued fraction [4, 2, ..., 2, 4] with n-1 2's in the middle. For the numerators, see A221174. - Greg Dresden and Tongjia Rao, Sep 02 2021
|
|
MATHEMATICA
|
LinearRecurrence[{2, 1}, {1, 4}, 30] (* Harvey P. Dale, Jul 27 2011 *)
|
|
PROG
|
(Haskell)
a048654 n = a048654_list !! n
a048654_list =
1 : 4 : zipWith (+) a048654_list (map (* 2) $ tail a048654_list)
(Maxima)
a[0]:1$
a[1]:4$
a[n]:=2*a[n-1]+a[n-2]$
(Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!((1+2*x)/(1-2*x-x^2))); // G. C. Greubel, Jul 26 2018
(SageMath) [lucas_number1(n+1, 2, -1) +2*lucas_number1(n, 2, -1) for n in (0..40)] # G. C. Greubel, Aug 09 2022
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nice,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|