login
A137224
Interleave 4*n^2, 1+4*n^2, 1+(2n+1)^2, (2n+1)^2 (or A016742, A053755, A069894, A016754).
1
0, 1, 2, 1, 4, 5, 10, 9, 16, 17, 26, 25, 36, 37, 50, 49, 64, 65, 82, 81, 100, 101, 122, 121, 144, 145, 170, 169, 196, 197, 226, 225, 256, 257, 290, 289, 324, 325, 362, 361, 400, 401, 442, 441, 484, 485, 530, 529, 576, 577, 626, 625, 676, 677, 730, 729, 784
OFFSET
0,3
FORMULA
From Colin Barker, Apr 01 2018: (Start)
G.f.: x*(1 + x - 2*x^2 + 2*x^3 + x^4 + x^5) / ((1 - x)^3*(1 + x)^2*(1 + x^2)).
a(n) = a(n-1) + a(n-2) - a(n-3) + a(n-4) - a(n-5) - a(n-6) + a(n-7) for n>6.
(End)
MATHEMATICA
Flatten[Table[{4n^2, 4n^2+1, (2n+1)^2+1, (2n+1)^2}, {n, 0, 20}]] (* or *) LinearRecurrence[{1, 1, -1, 1, -1, -1, 1}, {0, 1, 2, 1, 4, 5, 10}, 80] (* Harvey P. Dale, Mar 18 2016 *)
PROG
(PARI) concat(0, Vec(x*(1 + x - 2*x^2 + 2*x^3 + x^4 + x^5) / ((1 - x)^3*(1 + x)^2*(1 + x^2)) + O(x^60))) \\ Colin Barker, Apr 01 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Apr 05 2008
STATUS
approved