|
|
A168204
|
|
a(n) = 4*n - a(n-1) + 1 with n>1, a(1)=1.
|
|
1
|
|
|
1, 8, 5, 12, 9, 16, 13, 20, 17, 24, 21, 28, 25, 32, 29, 36, 33, 40, 37, 44, 41, 48, 45, 52, 49, 56, 53, 60, 57, 64, 61, 68, 65, 72, 69, 76, 73, 80, 77, 84, 81, 88, 85, 92, 89, 96, 93, 100, 97, 104, 101, 108, 105, 112, 109, 116, 113, 120, 117, 124, 121, 128, 125, 132, 129, 136
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
a(n) = a(n-1) + a(n-2) - a(n-3), a(1)=1, a(2)=8, a(3)=5.
G.f.: x*(1 + 7*x - 4*x^2)/((x-1)^2*(1+x)). (End)
E.g.f.: (1/2)*(5 - 8*exp(x) + (3 + 4*x)*exp(2*x))*exp(-x). - G. C. Greubel, Jul 15 2016
Sum_{n>=1} (-1)^(n+1)/a(n) = 1/4 + Pi/8 + 3*log(2)/4. - Amiram Eldar, Feb 23 2023
|
|
MATHEMATICA
|
RecurrenceTable[{a[1]==1, a[n]==4n-a[n-1]+1}, a[n], {n, 80}] (* or *) LinearRecurrence[{1, 1, -1}, {1, 8, 5}, 80] (* Harvey P. Dale, Jun 28 2011 *)
|
|
PROG
|
(Magma) I:=[1, 8, 5]; [n le 3 select I[n] else Self(n-1)+Self(n-2)-Self(n-3): n in [1..70]]; // Vincenzo Librandi, Feb 28 2012
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|