login
First row in maze arrangement of natural numbers A081344.
3

%I #19 Sep 08 2022 08:45:09

%S 1,4,5,16,17,36,37,64,65,100,101,144,145,196,197,256,257,324,325,400,

%T 401,484,485,576,577,676,677,784,785,900,901,1024,1025,1156,1157,1296,

%U 1297,1444,1445,1600,1601,1764,1765,1936,1937,2116,2117,2304,2305,2500

%N First row in maze arrangement of natural numbers A081344.

%H Vincenzo Librandi, <a href="/A081345/b081345.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,2,-2,-1,1).

%F a(n) = n^2 + n + 1 - n*(-1)^n = n^2 + n + 1 + n*(-1)^(n+1).

%F a(2*n) = A053755(n), a(2*n+1) = 4 * A004120(n).

%F G.f.: (5*x^3-x^2+3*x+1)/((1-x)^3*(1+x)^2). [_Colin Barker_, Sep 03 2012]

%t 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 *)

%o (Magma) [n^2+n+1-n*(-1)^n: n in [0..50]]; // _Vincenzo Librandi_, Aug 08 2013

%Y Cf. A081346.

%K easy,nonn

%O 0,2

%A _Paul Barry_, Mar 19 2003