|
|
A098586
|
|
a(n) = (1/2) * (5*P(n+1) + P(n) - 1), where P(k) are the Pell numbers A000129.
|
|
5
|
|
|
2, 5, 13, 32, 78, 189, 457, 1104, 2666, 6437, 15541, 37520, 90582, 218685, 527953, 1274592, 3077138, 7428869, 17934877, 43298624, 104532126, 252362877, 609257881, 1470878640, 3551015162, 8572908965, 20696833093, 49966575152, 120629983398, 291226541949
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
LINKS
|
|
|
FORMULA
|
a(n) = (-2+(5-3*sqrt(2))*(1-sqrt(2))^n + (1+sqrt(2))^n*(5+3*sqrt(2)))/4. - Colin Barker, Mar 16 2016
|
|
MAPLE
|
A:= LREtools[REtoproc](a(n) = 3*a(n-1) - a(n-2) - a(n-3), a(n), {a(0)=2, a(1)=5, a(2)=13}):
|
|
MATHEMATICA
|
CoefficientList[Series[(2-x)/((1-x)*(1-2*x-x^2)), {x, 0, 50}], x] (* G. C. Greubel, Feb 03 2018
|
|
PROG
|
(PARI) Vec((2-x)/((1-x)*(1-2*x-x^2)) + O(x^50)) \\ Colin Barker, Mar 16 2016
(Magma) I:=[2, 5, 13]; [n le 3 select I[n] else 3*Self(n-1) - Self(n-2) - Self(n-3): n in [1..30]]; // G. C. Greubel, Feb 03 2018
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|