A193868 Even central polygonal numbers.
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
Offset: 1
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..10000
- Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
Programs
-
Magma
[1+((2*n-1)*(2*n-1-(-1)^n)/2): n in [1..50]]; // Vincenzo Librandi, Aug 18 2011
-
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 *)
-
PARI
a(n)=(2*n-1)*(2*n-1-(-1)^n)/2+1 \\ Charles R Greathouse IV, Jun 11 2015
-
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
Formula
a(n) = 1 + A014493(n).
a(n) = 2*A174114(n).
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
From Colin Barker, Jan 27 2016: (Start)
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)
Sum_{n>=1} 1/a(n) = 2*Pi*sinh(sqrt(7)*Pi/4)/(sqrt(7)*(sqrt(2) + 2*cosh(sqrt(7)*Pi/4))). - Amiram Eldar, May 11 2025
Comments