[go: up one dir, main page]

login
A048772
Partial sums of A048696.
2
1, 10, 29, 76, 189, 462, 1121, 2712, 6553, 15826, 38213, 92260, 222741, 537750, 1298249, 3134256, 7566769, 18267802, 44102381, 106472572, 257047533, 620567646, 1498182833
OFFSET
0,2
FORMULA
a(n)=2*a(n-1)+a(n-2)+8; a(0)=1, a(1)=10.
a(n)=[ {(9+5*sqrt(2))(1+sqrt(2))^n - (9-5*sqrt(2))(1-sqrt(2))^n}/2*sqrt(2) ]-4.
a(0)=1, a(1)=10, a(2)=29, a(n)=3*a(n-1)-a(n-2)-a(n-3). - Harvey P. Dale, Apr 20 2012
G.f. ( 1+7*x ) / ( (x-1)*(x^2+2*x-1) ). a(n)=A048739(n)+7*A048739(n-1). - R. J. Mathar, Nov 08 2012
MATHEMATICA
Accumulate[LinearRecurrence[{2, 1}, {1, 9}, 30]] (* or *) LinearRecurrence[ {3, -1, -1}, {1, 10, 29}, 30] (* Harvey P. Dale, Apr 20 2012 *)
PROG
(Haskell)
a048772 n = a048772_list !! n
a048772_list = scanl1 (+) a048696_list
-- Reinhard Zumkeller, Dec 15 2013
(PARI) a(n)=([0, 1, 0; 0, 0, 1; -1, -1, 3]^n*[1; 10; 29])[1, 1] \\ Charles R Greathouse IV, Feb 10 2017
CROSSREFS
KEYWORD
easy,nice,nonn
STATUS
approved