A143839 Ulam's spiral (SSE spoke).
1, 24, 79, 166, 285, 436, 619, 834, 1081, 1360, 1671, 2014, 2389, 2796, 3235, 3706, 4209, 4744, 5311, 5910, 6541, 7204, 7899, 8626, 9385, 10176, 10999, 11854, 12741, 13660, 14611, 15594, 16609, 17656, 18735, 19846, 20989, 22164, 23371, 24610
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..40], n-> ((32*n -25)^2 +15)/64); # G. C. Greubel, Nov 09 2019
-
Magma
[16*n^2-25*n+10: n in [1..40]]; // Vincenzo Librandi, Nov 08 2014
-
Maple
seq( ((32*n -25)^2 +15)/64, n=1..40); # G. C. Greubel, Nov 09 2019
-
Mathematica
f[n_] := 16n^2 -25n +10; Array[f, 40] (* Vladimir Joseph Stephan Orlovsky, Sep 02 2008 *) LinearRecurrence[{3,-3,1},{1,24,79},40] (* Harvey P. Dale, May 26 2012 *) CoefficientList[Series[(1+21*x+10*x^2)/(1-x)^3, {x, 0, 40}], x] (* Vincenzo Librandi, Nov 08 2014 *)
-
PARI
Vec(x*(1+21*x+10*x^2)/(1-x)^3 + O(x^40)) \\ Colin Barker, Nov 08 2014
-
Sage
[((32*n -25)^2 +15)/64 for n in (1..40)] # G. C. Greubel, Nov 09 2019
Formula
a(n) = 16*n^2 - 25*n + 10. - R. J. Mathar, Sep 04 2008
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3); a(1) = 1, a(2) = 24, a(3) = 79. - Harvey P. Dale, May 26 2012
G.f.: x*(1 + 21*x + 10*x^2)/(1-x)^3. - Harvey P. Dale, May 26 2012
E.g.f.: exp(x)*(10 - 9*x + 16*x^2) - 9. - Stefano Spezia, Oct 07 2019
Comments