login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A248800
a(n) = (2*n^2 + 3 + (-1)^n)/2.
4
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,1
COMMENTS
Numbers belonging to A016825: a(n) = A016825( A002620(n) ). - Bruno Berselli, Oct 15 2014
For n>1, a(n) is the number of row vectors of length 2n with entries in [1,n], first entry 1, with maximum inner distance. That is, vectors where the modular distance between adjacent entries is at least (n-2)/2. Modular distance is the minimum of remainders of (x - y) and (y - x) when dividing by n. Geometrically, this metric counts how far the integers mod n are from each other if 1 and n are adjacent as on a circle. - Omar Aceval Garcia, Jan 30 2021
LINKS
FORMULA
a(n) = A000290(n) + A000034(n+1) = 4*A002620(n) + 2.
a(n+1) = 2*A080827(n+1) = (n+2)^2 - A042964(n+1) = a(n) + 2*n + 1 -(-1)^n.
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
a(2n) = A005899(n) for n > 0, a(2n+1) = A069894(n). - Omar Aceval Garcia, Dec 30 2021
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 *)
PROG
(PARI) Vec(-2*(x^3+x^2-x+1)/((x-1)^3*(x+1)) + O(x^100)) \\ Colin Barker, Oct 15 2014
(Magma) [n^2+3/2+(-1)^n/2: n in [0..50]]; // Vincenzo Librandi, Oct 15 2014
(Sage) [(2*n^2 +3 +(-1)^n)/2 for n in (0..50)] # G. C. Greubel, Dec 14 2021
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Oct 14 2014
EXTENSIONS
Typo in data fixed by Colin Barker, Oct 15 2014
STATUS
approved