|
|
|
|
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.
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
|
|
MATHEMATICA
|
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
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|