|
|
A316528
|
|
a(n) = 3*a(n-1) - a(n-2) - 2*a(n-3) for n > 2, a(0)=1, a(1)=4, a(2)=10.
|
|
3
|
|
|
1, 4, 10, 24, 54, 118, 252, 530, 1102, 2272, 4654, 9486, 19260, 38986, 78726, 158672, 319318, 641830, 1288828, 2586018, 5185566, 10393024, 20821470, 41700254, 83493244, 167136538, 334515862, 669424560, 1339484742, 2679997942, 5361659964, 10726012466, 21456381550
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
G.f.: (1 + x - x^2)/((1 - 2*x)*(1 - x - x^2)).
a(n) = 2*A116712(n) for n > 0, a(0)=1.
a(n) = (5*2^n - (2^(1-n)*((1-sqrt(5))^n*(-2+sqrt(5)) + (1+sqrt(5))^n*(2+sqrt(5))))/sqrt(5)). - Colin Barker, Jul 23 2018
|
|
MAPLE
|
seq(coeff(series((1+x-x^2)/(1-3*x+x^2+2*x^3), x, n+1), x, n), n=0..35); # Muniru A Asiru, Jul 14 2018
|
|
MATHEMATICA
|
RecurrenceTable[{a[n] == 3 a[n - 1] - a[n - 2] - 2 a[n - 3], a[0] == 1, a[1] == 4, a[2] == 10}, a, {n, 0, 40}]
Table[5 2^n - 2 Fibonacci[n + 3], {n, 0, 40}] (* Bruno Berselli, Jul 16 2018 *)
LinearRecurrence[{3, -1, -2}, {1, 4, 10}, 40] (* Harvey P. Dale, Jul 18 2020 *)
|
|
PROG
|
(Magma) I:=[1, 4, 10]; [n le 3 select I[n] else 3*Self(n-1)-Self(n-2)-2*Self(n-3): n in [1..40]];
(GAP) a:=[1, 4, 10];; for n in [4..35] do a[n]:=3*a[n-1]-a[n-2]-2*a[n-3]; od; a; # Muniru A Asiru, Jul 14 2018
(PARI) Vec((1 + x - x^2)/((1 - 2*x)*(1 - x - x^2)) + O(x^40)) \\ Colin Barker, Jul 23 2018
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|