A143854 Ulam's spiral (WSW spoke).
1, 20, 71, 154, 269, 416, 595, 806, 1049, 1324, 1631, 1970, 2341, 2744, 3179, 3646, 4145, 4676, 5239, 5834, 6461, 7120, 7811, 8534, 9289, 10076, 10895, 11746, 12629, 13544, 14491, 15470, 16481, 17524, 18599, 19706, 20845, 22016, 23219, 24454
Offset: 1
Links
- G. C. Greubel, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
Programs
-
GAP
List([1..50], n-> ((32*n-29)^2 +55)/64); # G. C. Greubel, Nov 09 2019
-
Magma
[14-29*n+16*n^2: n in [1..50]]; // Vincenzo Librandi, Nov 08 2014
-
Maple
seq( ((32*n-29)^2 +55)/64, n=1..40); # G. C. Greubel, Nov 09 2019
-
Mathematica
f[n_]:= 16n^2 -29n +14; Array[f, 40] (* Vladimir Joseph Stephan Orlovsky, Sep 03 2008 *) CoefficientList[Series[(1+17x+14x^2)/(1-x)^3, {x, 0, 40}], x] (* Vincenzo Librandi, Nov 08 2014 *) ((32*Range[50] -29)^2 +55)/64 (* G. C. Greubel, Nov 09 2019 *)
-
PARI
vector(50, n, 14-29*n+16*n^2) \\ Michel Marcus, Nov 08 2014
-
Sage
[((32*n-29)^2 +55)/64 for n in (1..50)] # G. C. Greubel, Nov 09 2019
Formula
From Colin Barker, Aug 03 2012: (Start)
a(n) = 14 - 29*n + 16*n^2.
G.f.: x*(1 + 17*x + 14*x^2)/(1-x)^3. (End)
E.g.f.: -14 + (14 - 13*x + 16*x^2)*exp(x). - G. C. Greubel, Nov 09 2019
Comments