A248800 a(n) = (2*n^2 + 3 + (-1)^n)/2.
2, 2, 6, 10, 18, 26, 38, 50, 66, 82, 102, 122, 146, 170, 198, 226, 258, 290, 326, 362, 402, 442, 486, 530, 578, 626, 678, 730, 786, 842, 902, 962, 1026, 1090, 1158, 1226, 1298, 1370, 1446, 1522, 1602, 1682, 1766, 1850, 1938, 2026, 2118
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Omar Aceval Garcia, On the Number of Maximum Inner Distance Latin Squares, arXiv:2112.13912 [math.CO], 2021.
- Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
Programs
-
Magma
[n^2+3/2+(-1)^n/2: n in [0..50]]; // Vincenzo Librandi, Oct 15 2014
-
Mathematica
Table[n^2 + 3/2 + (-1)^n/2, {n, 0, 50}] (* Bruno Berselli, Oct 15 2014 *) CoefficientList[Series[2(x^3+x^2-x+1)/((1-x)^3 (x+1)), {x, 0, 50}], x] (* Vincenzo Librandi, Oct 15 2014 *) LinearRecurrence[{2,0,-2,1},{2,2,6,10},60] (* Harvey P. Dale, Apr 08 2019 *)
-
PARI
Vec(-2*(x^3+x^2-x+1)/((x-1)^3*(x+1)) + O(x^100)) \\ Colin Barker, Oct 15 2014
-
Sage
[(2*n^2 +3 +(-1)^n)/2 for n in (0..50)] # G. C. Greubel, Dec 14 2021
Formula
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4). - Colin Barker, Oct 15 2014
G.f.: 2*(1-x+x^2+x^3) / ((1-x)^3*(x+1)). - Colin Barker, Oct 15 2014
E.g.f.: cosh(x) + (1 + x + x^2)*exp(x). - G. C. Greubel, Dec 14 2021
Extensions
Typo in data fixed by Colin Barker, Oct 15 2014
Comments