A081345 First row in maze arrangement of natural numbers A081344.
1, 4, 5, 16, 17, 36, 37, 64, 65, 100, 101, 144, 145, 196, 197, 256, 257, 324, 325, 400, 401, 484, 485, 576, 577, 676, 677, 784, 785, 900, 901, 1024, 1025, 1156, 1157, 1296, 1297, 1444, 1445, 1600, 1601, 1764, 1765, 1936, 1937, 2116, 2117, 2304, 2305, 2500
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
Crossrefs
Cf. A081346.
Programs
-
Magma
[n^2+n+1-n*(-1)^n: n in [0..50]]; // Vincenzo Librandi, Aug 08 2013
-
Mathematica
CoefficientList[Series[(5 x^3 - x^2 + 3 x + 1) / ((1 - x)^3 (1 + x)^2), {x, 0, 50}], x] (* Vincenzo Librandi, Aug 08 2013 *)
Formula
a(n) = n^2 + n + 1 - n*(-1)^n = n^2 + n + 1 + n*(-1)^(n+1).
G.f.: (5*x^3-x^2+3*x+1)/((1-x)^3*(1+x)^2). [Colin Barker, Sep 03 2012]