login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A048745 Partial sums of A048654. 3
1, 5, 14, 36, 89, 217, 526, 1272, 3073, 7421, 17918, 43260, 104441, 252145, 608734, 1469616, 3547969, 8565557, 20679086, 49923732, 120526553, 290976841, 702480238, 1695937320, 4094354881, 9884647085, 23863649054, 57611945196, 139087539449, 335787024097 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
FORMULA
a(n) = 2*a(n-1) + a(n-2) + 3, a(0)=1, a(1)=5.
a(n) = ( ((4+(5/2)*sqrt(2))*(1+sqrt(2))^n - (4-(5/2)*sqrt(2))*(1-sqrt(2))^n)/ 2*sqrt(2) ) - 3/2.
G.f.: (1+2*x)/((1-x)*(1-2*x-x^2)). - Paul D. Hanna, Feb 22 2005
a(n) = 3*a(n-1) - a(n-2) - a(n-3), n>2, a(0)=1, a(1)=5, a(2)=14. - Philippe Deléham, Dec 16 2008
2*a(n) = A135532(n+2) - 3. - R. J. Mathar, Mar 06 2013
a(n) = (1/2)*( 5*P(n+1) + 3*P(n) - 3), where P(n) = A000129(n). - G. C. Greubel, May 23 2021
MATHEMATICA
t={1, 5}; Do[AppendTo[t, t[[-2]] + 2*t[[-1]] + 3], {n, 40}]; t (* Vladimir Joseph Stephan Orlovsky, Jan 27 2012 *)
Accumulate[LinearRecurrence[{2, 1}, {1, 4}, 30]] (* or *) LinearRecurrence[{3, -1, -1}, {1, 5, 14}, 30] (* Harvey P. Dale, Aug 03 2020 *)
PROG
(PARI) a(n)=polcoeff((1+2*x)/(1-3*x+x^2+x^3)+x*O(x^n), n) \\ Paul D. Hanna
(Magma) I:=[1, 5, 14]; [n le 3 select I[n] else 3*Self(n-1) -Self(n-2) -Self(n-3): n in [1..31]]; // G. C. Greubel, May 23 2021
(Sage) [(5*lucas_number1(n+1, 2, -1) + 3*lucas_number1(n, 2, -1) -3)/2 for n in (0..30)] # G. C. Greubel, May 23 2021
CROSSREFS
Sequence in context: A187198 A097507 A052951 * A307462 A292170 A224716
KEYWORD
easy,nonn
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 20:33 EDT 2024. Contains 371916 sequences. (Running on oeis4.)