|
|
A193868
|
|
Even central polygonal numbers.
|
|
4
|
|
|
2, 4, 16, 22, 46, 56, 92, 106, 154, 172, 232, 254, 326, 352, 436, 466, 562, 596, 704, 742, 862, 904, 1036, 1082, 1226, 1276, 1432, 1486, 1654, 1712, 1892, 1954, 2146, 2212, 2416, 2486, 2702, 2776, 3004, 3082, 3322, 3404, 3656, 3742, 4006, 4096, 4372
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Odd triangular numbers plus 1.
|
|
LINKS
|
|
|
FORMULA
|
G.f.: -2*x*(1+x+4*x^2+x^3+x^4) / ( (1+x)^2*(x-1)^3 ). - R. J. Mathar, Aug 25 2011
a(n) = (3+(-1)^n-2*(2+(-1)^n)*n+4*n^2)/2.
a(n) = 2*n^2-3*n+2 for n even.
a(n) = 2*n^2-n+1 for n odd.
(End)
|
|
MATHEMATICA
|
Table[(3 + (-1)^n - 2 (2 + (-1)^n) n + 4 n^2)/2, {n, 50}] (* or *)
Select[PolygonalNumber@ Range@ 100, OddQ] + 1 (* Version 10.4, or *)
Table[If[EvenQ@ n, 2 n^2 - 3 n + 2, 2 n^2 - n + 1], {n, 50}] (* or *)
Rest@ CoefficientList[Series[-2 x (1 + x + 4 x^2 + x^3 + x^4)/((1 + x)^2 (x - 1)^3), {x, 0, 50}], x] (* Michael De Vlieger, Jun 30 2016 *)
LinearRecurrence[{1, 2, -2, -1, 1}, {2, 4, 16, 22, 46}, 50] (* Harvey P. Dale, Sep 13 2020 *)
|
|
PROG
|
(Magma) [1+((2*n-1)*(2*n-1-(-1)^n)/2): n in [1..50]]; // Vincenzo Librandi, Aug 18 2011
(PARI) Vec(2*x*(1+x+4*x^2+x^3+x^4)/((1-x)^3*(1+x)^2) + O(x^100)) \\ Colin Barker, Jan 27 2016
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|