%I #31 Sep 08 2022 08:45:38
%S 1,16,63,142,253,396,571,778,1017,1288,1591,1926,2293,2692,3123,3586,
%T 4081,4608,5167,5758,6381,7036,7723,8442,9193,9976,10791,11638,12517,
%U 13428,14371,15346,16353,17392,18463,19566,20701,21868,23067,24298
%N Ulam's spiral (NNW spoke).
%C Also, except for the first term, sequence found by reading the line from 16, in the direction 16, 63,... in the square spiral whose vertices are the generalized decagonal numbers A074377. - _Omar E. Pol_, Nov 05 2012
%H Vincenzo Librandi, <a href="/A143860/b143860.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1).
%F a(n) = 16*n^2 - 33*n + 18. - _R. J. Mathar_, Sep 08 2008
%F G.f. x*(1 + 13*x + 18*x^2)/(1-x)^3. - _R. J. Mathar_, Oct 31 2011
%F a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - _Vincenzo Librandi_, Jul 10 2012
%F E.g.f.: -18 + (18 - 17*x + 16*x^2)*exp(x). - _G. C. Greubel_, Nov 09 2019
%p seq( ((32*n-33)^2 +63)/64, n=1..40); # _G. C. Greubel_, Nov 09 2019
%t f[n_]:= 16n^2 -33n +18; Array[f, 40] (* _Robert G. Wilson v_, Oct 31 2011 *)
%t ((32*Range[50]-33)^2 +63)/64 (* _G. C. Greubel_, Nov 09 2019 *)
%o (Magma) [16*n^2-33*n+18: n in [1..40]]; // _Vincenzo Librandi_, Jul 10 2012
%o (PARI) a(n)=16*n^2-33*n+18 \\ _Charles R Greathouse IV_, Jun 17 2017
%o (Sage) [((32*n-33)^2 +63)/64 for n in (1..40)] # _G. C. Greubel_, Nov 09 2019
%o (GAP) List([1..40], n-> ((32*n-33)^2 +63)/64); # _G. C. Greubel_, Nov 09 2019
%K nonn,easy
%O 1,2
%A _Vladimir Joseph Stephan Orlovsky_, Sep 03 2008