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”).

A081353
Diagonal of square maze arrangement of natural numbers A081349.
2
3, 5, 13, 19, 31, 41, 57, 71, 91, 109, 133, 155, 183, 209, 241, 271, 307, 341, 381, 419, 463, 505, 553, 599, 651, 701, 757, 811, 871, 929, 993, 1055, 1123, 1189, 1261, 1331, 1407, 1481, 1561, 1639, 1723, 1805, 1893, 1979, 2071, 2161, 2257, 2351, 2451, 2549
OFFSET
0,1
FORMULA
a(n) = (n+1)*(n+2)+(-1)^n = 2*binomial(n+2,2)+(-1)^n.
G.f.: (3-x)*(1+x^2)/((1-x)^3*(1+x)). [Colin Barker, Sep 03 2012]
From Wesley Ivan Hurt, Aug 09 2015: (Start)
a(n) = 2*a(n-1)-2*a(n-3)+a(n-4), n>4.
a(n) = n^2+3n+3 if n is even, otherwise n^2+3n+1.
a(n) = A137932(n+3) - A109613(n+1). (End)
MAPLE
A081353:=n->(n+1)*(n+2)+(-1)^n: seq(A081353(n), n=0..100); # Wesley Ivan Hurt, Aug 09 2015
MATHEMATICA
Table[(n + 1) (n + 2) + (-1)^n, {n, 0, 70}] (* Wesley Ivan Hurt, Aug 09 2015 *)
LinearRecurrence[{2, 0, -2, 1}, {3, 5, 13, 19}, 50] (* Harvey P. Dale, Aug 02 2021 *)
PROG
(Magma) [(n + 1)*(n + 2) + (-1)^n: n in [0..50]]; // Vincenzo Librandi, Sep 06 2011
CROSSREFS
Bisections are in A054554, A125202.
Sequence in context: A019420 A306930 A019358 * A238092 A024820 A360884
KEYWORD
nonn,easy
AUTHOR
Paul Barry, Mar 19 2003
STATUS
approved