A143859 Ulam's spiral (WNW spoke).
1, 18, 67, 148, 261, 406, 583, 792, 1033, 1306, 1611, 1948, 2317, 2718, 3151, 3616, 4113, 4642, 5203, 5796, 6421, 7078, 7767, 8488, 9241, 10026, 10843, 11692, 12573, 13486, 14431, 15408, 16417, 17458, 18531, 19636, 20773, 21942, 23143, 24376
Offset: 1
Links
- Harvey P. Dale, 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-31)^2+63)/64); # G. C. Greubel, Nov 09 2019
-
Magma
[16*n^2-31*n+16: n in [1..50]]; // Vincenzo Librandi, Nov 08 2014
-
Maple
seq( ((32*n-31)^2+63)/64, n=1..50); # G. C. Greubel, Nov 09 2019
-
Mathematica
f[n_]:= 16n^2 -31n +16; Array[f, 40] (* Vladimir Joseph Stephan Orlovsky, Sep 03 2008 *) LinearRecurrence[{3,-3,1},{1,18,67},40] (* Harvey P. Dale, Mar 24 2012 *) CoefficientList[Series[(1+15x+16x^2)/(1-x)^3, {x,0,40}], x] (* Vincenzo Librandi, Nov 08 2014 *)
-
PARI
vector(50, n, 16*n^2-31*n+16) \\ Michel Marcus, Nov 08 2014
-
Sage
[((32*n-31)^2+63)/64 for n in (1..50)] # G. C. Greubel, Nov 09 2019
Formula
a(n) = 16*n^2 - 31*n + 16. - R. J. Mathar, Sep 08 2008
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3), a(1)=1, a(2)=18, a(3)=67. - Harvey P. Dale, Mar 24 2012
G.f.: x*(1 + 15*x + 16*x^2)/(1-x)^3. - Colin Barker, Aug 03 2012
E.g.f.: -16 + (16 - 15*x + 16*x^2)*exp(x). - G. C. Greubel, Nov 09 2019
Comments