A143856 Ulam's spiral (ENE spoke).
1, 12, 55, 130, 237, 376, 547, 750, 985, 1252, 1551, 1882, 2245, 2640, 3067, 3526, 4017, 4540, 5095, 5682, 6301, 6952, 7635, 8350, 9097, 9876, 10687, 11530, 12405, 13312, 14251, 15222, 16225, 17260, 18327, 19426, 20557, 21720, 22915, 24142
Offset: 1
Links
- Vincenzo Librandi, 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-37)^2 +39)/64); # G. C. Greubel, Nov 09 2019
-
Magma
[16*n^2 -37*n +22: n in [1..40]]; // Vincenzo Librandi, Jul 10 2012
-
Maple
seq( ((32*n-37)^2 +39)/64, n=1..40); # G. C. Greubel, Nov 09 2019
-
Mathematica
f[n_]:= 16n^2 -37n +22; Array[f, 40] (* Robert G. Wilson v, Oct 31 2011 *) Table[16n^2-37*n+22,{n,1,40}] (* Vincenzo Librandi, Jul 10 2012 *) LinearRecurrence[{3,-3,1},{1,12,55},50] (* Harvey P. Dale, Sep 02 2024 *)
-
PARI
a(n)=16*n^2-37*n+22 \\ Charles R Greathouse IV, Jun 17 2017
-
Sage
[((32*n-37)^2 +39)/64 for n in (1..40)] # G. C. Greubel, Nov 09 2019
Formula
a(n) = 16*n^2 - 37*n + 22. - R. J. Mathar, Sep 08 2008
G.f. x*(1 + 9*x + 22*x^2)/(1-x)^3. - R. J. Mathar, Oct 31 2011
a(n) = 3*a(n-1) -3*a(n-2) +a(n-3). - Vincenzo Librandi, Jul 10 2012
E.g.f.: -22 + (22 - 21*x + 16*x^2)*exp(x). - G. C. Greubel, Nov 09 2019
Comments