[go: up one dir, main page]

login
A159342
Transform of the finite sequence (1, 0, -1, 0, 1, 0, -1) by the T_{0,1} transform (see link).
1
2, 3, 6, 16, 39, 89, 207, 480, 1116, 2595, 6033, 14025, 32604, 75795, 176202, 409620, 952251, 2213715, 5146263, 11963610, 27812019, 64655100, 150304872, 349416435, 812294661, 1888355985, 4389895068, 10205267895, 23724369534, 55152467880
OFFSET
0,1
FORMULA
O.g.f.: ((1-x)^2/(1-3*x+2*x^2-x^3))*(1-x^2+x^4+x^6)+((1-x+x^2)/(1-3*x+2*x^2-x^3)).
a(n) = 3*a(n-1) - 2*a(n-2) + a(n-3) for n >= 9, with a(0)=2, a(1)=3, a(2)=6, a(3)=16, a(4)=39, a(5)=89, a(6)=207, a(7)=480, a(8)=1116.
MAPLE
a(0):=2: a(1):=3:a(2):=6: a(3):=16:a(4):=39:a(5):=89:a(6):=207:a(7):=480:a(8):=1116:for n from 6 to 31 do a(n+3):=3*a(n+2)-2*a(n+1)+a(n):od:seq(a(i), i=0..31);
MATHEMATICA
Join[{2, 3, 6, 16, 39, 89}, LinearRecurrence[{3, -2, 1}, {207, 480, 1116}, 50]] (* G. C. Greubel, Jun 17 2018 *)
PROG
(PARI) m=50; v=concat([207, 480, 1116], vector(m-3)); for(n=4, m, v[n] = 3*v[n-1] -2*v[n-2] +v[n-3]); concat([2, 3, 6, 16, 39, 89], v) \\ G. C. Greubel, Jun 17 2018
(Magma) I:=[207, 480, 1116]; [2, 3, 6, 16, 39, 89] cat [n le 3 select I[n] else 3*Self(n-1) - 2*Self(n-2) +Self(n-3): n in [1..50]]; // G. C. Greubel, Jun 17 2018
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Richard Choulet, Apr 11 2009
STATUS
approved