|
|
A086970
|
|
Fix 1, then exchange the subsequent odd numbers in pairs.
|
|
3
|
|
|
1, 5, 3, 9, 7, 13, 11, 17, 15, 21, 19, 25, 23, 29, 27, 33, 31, 37, 35, 41, 39, 45, 43, 49, 47, 53, 51, 57, 55, 61, 59, 65, 63, 69, 67, 73, 71, 77, 75, 81, 79, 85, 83, 89, 87, 93, 91, 97, 95, 101, 99, 105, 103, 109, 107, 113, 111, 117, 115, 121, 119
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
G.f.: (1+4*x-3*x^2+2*x^3)/((1+x)*(1-x)^2).
a(n) = 2*n + 1 - 2*(-1)^n for n > 0.
a(n) = 2*n + 1 - 2*cos(n*Pi) for n > 0.
a(n) = 4*n - a(n-1) for n > 1.
Linear recurrence: a(n) = a(n-1) + a(n-2) - a(n-3) for n > 3.
First differences: 2 - 4*(-1)^n for n > 1; -(-1)^n*A010696(n) for n > 1.
a(2*n+2) = A004767(n) for n >= 0. (End)
|
|
MATHEMATICA
|
Join[{1}, LinearRecurrence[{1, 1, -1}, {5, 3, 9}, 60]] (* Vincenzo Librandi, Jun 21 2017 *)
|
|
PROG
|
(PARI) Vec((1+4*x-3*x^2+2*x^3)/((1+x)*(1-x)^2) + O(x^100)) \\ Michel Marcus, Jun 21 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|