|
|
A168418
|
|
a(n) = 9*n - a(n-1) - 8 with n>1, a(1)=5.
|
|
2
|
|
|
5, 5, 14, 14, 23, 23, 32, 32, 41, 41, 50, 50, 59, 59, 68, 68, 77, 77, 86, 86, 95, 95, 104, 104, 113, 113, 122, 122, 131, 131, 140, 140, 149, 149, 158, 158, 167, 167, 176, 176, 185, 185, 194, 194, 203, 203, 212, 212, 221, 221, 230, 230, 239, 239, 248, 248, 257
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
G.f.: x*(5 + 4*x^2)/((1+x)*(x-1)^2). (End)
a(n) = a(n-1) + a(n-2) - a(n-3).
E.g.f.: (1/4)*(-9 + 16*exp(x) + (18*x - 7)*exp(2*x))*exp(-x). (End)
|
|
MATHEMATICA
|
RecurrenceTable[{a[1]==5, a[n]==9n-a[n-1]-8}, a, {n, 60}] (* or *) With[ {c= LinearRecurrence[{2, -1}, {5, 14}, 40]}, Riffle[c, c]] (* or *) With[{c= 9* Range[ 40]-4}, Riffle[c, c]] (* Harvey P. Dale, Jan 25 2019 *)
|
|
PROG
|
(Magma) I:=[5, 5, 14]; [n le 3 select I[n] else Self(n-1)+Self(n-2)-Self(n-3): n in [1..60]]; // Vincenzo Librandi, Feb 28 2012
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|