|
|
A022309
|
|
a(n) = a(n-1) + a(n-2) + 1 for n>1, a(0)=0, a(1)=4.
|
|
1
|
|
|
0, 4, 5, 10, 16, 27, 44, 72, 117, 190, 308, 499, 808, 1308, 2117, 3426, 5544, 8971, 14516, 23488, 38005, 61494, 99500, 160995, 260496, 421492, 681989, 1103482, 1785472, 2888955, 4674428, 7563384, 12237813, 19801198, 32039012, 51840211, 83879224, 135719436
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
LINKS
|
|
|
FORMULA
|
G.f. -x*(-4+3*x) / ( (x-1)*(x^2+x-1) ).
a(n) = -1 + (2^(-1-n)*((1-t)^n*(-9+t) + (1+t)^n*(9+t)))/t, where t=sqrt(5).
a(n) = 2*a(n-1) - a(n-3) for n>2. (End)
|
|
MATHEMATICA
|
RecurrenceTable[{a[0]==0, a[1]==4, a[n]==a[n-1]+a[n-2]+1}, a, {n, 40}] (* or *) CoefficientList[Series[-x(-4+3x)/((x-1)(x^2+x-1)), {x, 0, 40}], x] (* Harvey P. Dale, Apr 24 2011 *)
|
|
PROG
|
(PARI) concat(0, Vec(x*(4-3*x) / ((1-x)*(1-x-x^2)) + O(x^50))) \\ Colin Barker, Feb 20 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|