A048696 Generalized Pellian with second term equal to 9.
1, 9, 19, 47, 113, 273, 659, 1591, 3841, 9273, 22387, 54047, 130481, 315009, 760499, 1836007, 4432513, 10701033, 25834579, 62370191, 150574961, 363520113, 877615187, 2118750487, 5115116161, 12348982809, 29813081779, 71975146367
Offset: 0
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..1000
- Tanya Khovanova, Recursive Sequences
- Index entries for linear recurrences with constant coefficients, signature (2,1).
Programs
-
Haskell
a048696 n = a048696_list !! n a048696_list = 1 : 9 : zipWith (+) a048696_list (map (2 *) $ tail a048696_list) -- Reinhard Zumkeller, Dec 15 2013
-
Magma
[ n le 2 select 8*n-7 else 2*Self(n-1)+Self(n-2): n in [1..28] ]; // Klaus Brockhaus, Aug 17 2009
-
Maple
with(combinat): a:=n->7*fibonacci(n, 2)+fibonacci(n+1, 2): seq(a(n), n=0..25); # Zerinvary Lajos, Apr 04 2008
-
Mathematica
a[n_]:=(MatrixPower[{{1,2},{1,1}},n].{{8},{1}})[[2,1]]; Table[a[n],{n,0,40}] (* Vladimir Joseph Stephan Orlovsky, Feb 20 2010 *) LinearRecurrence[{2,1},{1,9},30] (* Harvey P. Dale, Apr 20 2012 *)
-
Maxima
a[0]:1$ a[1]:9$ a[n]:=2*a[n-1]+a[n-2]$ A048696(n):=a[n]$ makelist(A048696(n),n,0,30); /* Martin Ettl, Nov 03 2012 */
Formula
a(n) = 2*a(n-1) + a(n-2); a(0)=1, a(1)=9.
a(n) = ((4*sqrt(2)+1)(1+sqrt(2))^n - (4*sqrt(2)-1)(1-sqrt(2))^n)/2.
G.f.: (1+7*x)/(1 - 2*x - x^2). - Philippe Deléham, Nov 03 2008
Comments