login
A086955
a(n) = n^2 + 2*n + 2 - (-1)^n.
3
1, 6, 9, 18, 25, 38, 49, 66, 81, 102, 121, 146, 169, 198, 225, 258, 289, 326, 361, 402, 441, 486, 529, 578, 625, 678, 729, 786, 841, 902, 961, 1026, 1089, 1158, 1225, 1298, 1369, 1446, 1521, 1602, 1681, 1766, 1849, 1938, 2025, 2118, 2209, 2306, 2401, 2502
OFFSET
0,2
FORMULA
G.f.: (1 + 4*x - 3*x^2 + 2*x^3)/((1+x)*(1-x)^3).
a(2*n) = (2*n+1)^2 = A016754(n), a(2*n+1) = 4*n^2 + 8*n + 6 = A005899(n+1).
MAPLE
A086955:=n->n^2+2*n+2-(-1)^n; seq(A086955(n), n=0..100); # Wesley Ivan Hurt, Nov 30 2013
MATHEMATICA
Table[n^2+2n+2-(-1)^n, {n, 0, 100}] (* Wesley Ivan Hurt, Nov 30 2013 *)
PROG
(Magma) [n^2+2*n+2-(-1)^n: n in [0..50]]; // Vincenzo Librandi, Sep 06 2011
CROSSREFS
Cf. A080335.
Sequence in context: A316071 A039280 A045091 * A270794 A297623 A293283
KEYWORD
nonn,easy
AUTHOR
Paul Barry, Jul 25 2003
STATUS
approved