|
|
A080460
|
|
a(1) = 2; for n > 1, a(n) = a(n-1) if n is already in the sequence, a(n) = a(n-1) + 4 otherwise.
|
|
0
|
|
|
2, 2, 6, 10, 14, 14, 18, 22, 26, 26, 30, 34, 38, 38, 42, 46, 50, 50, 54, 58, 62, 62, 66, 70, 74, 74, 78, 82, 86, 86, 90, 94, 98, 98, 102, 106, 110, 110, 114, 118, 122, 122, 126, 130, 134, 134, 138, 142, 146, 146, 150, 154, 158, 158, 162, 166, 170, 170
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 2 + 4*(n - 2 - floor((n - 2)/4)).
a(n) = a(n-1) + a(n-4) - a(n-5) for n > 5.
G.f.: 2*x*(x^4 + 2*x^3 + 2*x^2 + 1)/(x^5 - x^4 - x + 1). (End)
E.g.f.: 2 + (3*x - 2)*sinh(x) + 3*(x - 1)*cosh(x) + sin(x) + cos(x).
a(n) = (6*n - (-1)^n + 2*sqrt(2)*sin(Pi*n/2 + Pi/4) - 5)/2. (End)
|
|
MATHEMATICA
|
LinearRecurrence[{1, 0, 0, 1, -1}, {2, 2, 6, 10, 14}, 58] (* Jean-François Alcover, Jan 07 2019 *)
|
|
PROG
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|