A048654 a(n) = 2*a(n-1) + a(n-2); a(0)=1, a(1)=4.
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
Offset: 0
Links
- T. D. Noe, Table of n, a(n) for n = 0..300
- Andreas M. Hinz and Paul K. Stockmeyer, Precious Metal Sequences and Sierpinski-Type Graphs, J. Integer Seq., Vol 25 (2022), Article 22.4.8.
- A. F. Horadam, Pell Identities, Fib. Quart., Vol. 9, No. 3, 1971, pp. 245-252.
- A. F. Horadam, Basic Properties of a Certain Generalized Sequence of Numbers, Fibonacci Quarterly, Vol. 3, No. 3, 1965, pp. 161-176.
- A. F. Horadam, Special properties of the sequence W_n(a,b; p,q), Fib. Quart., 5.5 (1967), 424-434.
- Tanya Khovanova, Recursive Sequences
- Index entries for linear recurrences with constant coefficients, signature (2,1).
Programs
-
Haskell
a048654 n = a048654_list !! n a048654_list = 1 : 4 : zipWith (+) a048654_list (map (* 2) $ tail a048654_list) -- Reinhard Zumkeller, Aug 01 2011
-
Magma
R
:=PowerSeriesRing(Integers(), 40); Coefficients(R!((1+2*x)/(1-2*x-x^2))); // G. C. Greubel, Jul 26 2018 -
Mathematica
LinearRecurrence[{2,1},{1,4},30] (* Harvey P. Dale, Jul 27 2011 *)
-
Maxima
a[0]:1$ a[1]:4$ a[n]:=2*a[n-1]+a[n-2]$ A048654(n):=a[n]$ makelist(A048654(n),n,0,30); /* Martin Ettl, Nov 03 2012 */
-
PARI
a(n)=(([0, 1; 1,2]^n)*[1,4]~)[1] \\ Charles R Greathouse IV, May 18 2015
-
SageMath
[lucas_number1(n+1,2,-1) +2*lucas_number1(n,2,-1) for n in (0..40)] # G. C. Greubel, Aug 09 2022
Formula
a(n) = ((3+sqrt(2))*(1+sqrt(2))^n - (3-sqrt(2))*(1-sqrt(2))^n)/2*sqrt(2).
G.f.: (1+2*x)/(1-2*x-x^2). - Philippe Deléham, Nov 03 2008
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
Comments