%I #79 Sep 03 2024 15:09:33
%S 1,8,23,46,77,116,163,218,281,352,431,518,613,716,827,946,1073,1208,
%T 1351,1502,1661,1828,2003,2186,2377,2576,2783,2998,3221,3452,3691,
%U 3938,4193,4456,4727,5006,5293,5588,5891,6202,6521,6848,7183,7526,7877,8236,8603,8978
%N Write 1,2,... in a clockwise spiral; sequence gives numbers on positive x axis.
%C Ulam's spiral (S spoke of A054552). - _Robert G. Wilson v_, Oct 31 2011
%C a(n) is the first term in a sum of 2*n + 1 consecutive integers that equals (2*n + 1)^3. - _Patrick J. McNab_, Dec 24 2016
%H Ivan Panchenko, <a href="/A033951/b033951.txt">Table of n, a(n) for n = 0..1000</a>
%H Robert G. Wilson v, <a href="/A244677/a244677.jpg">Cover of the March 1964 issue of Scientific American</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1).
%F a(n) = 4*n^2 + 3*n + 1.
%F G.f.: (1 + 5*x + 2*x^2)/(1-x)^3.
%F A014848(2n+1) = a(n).
%F Equals A132774 * [1, 2, 3, ...]; = binomial transform of [1, 7, 8, 0, 0, 0, ...]. - _Gary W. Adamson_, Aug 28 2007
%F a(n) = A016754(n) - n. - _Reinhard Zumkeller_, May 17 2009
%F a(n) = a(n-1) + 8*n-1 (with a(0)=1). - _Vincenzo Librandi_, Nov 17 2010
%F a(0)=1, a(1)=8, a(2)=23, a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - _Harvey P. Dale_, Feb 07 2015
%F E.g.f.: exp(x)*(1 + 7*x + 4*x^2). - _Stefano Spezia_, Apr 24 2024
%e Spiral begins:
%e .
%e 65--66--67--68--69--70--71--72--73
%e | |
%e 64 37--38--39--40--41--42--43 74
%e | | | |
%e 63 36 17--18--19--20--21 44 75
%e | | | | | |
%e 62 35 16 5---6---7 22 45 76
%e | | | | | | | |
%e 61 34 15 4 1 8 23 46 77
%e | | | | | | | |
%e 60 33 14 3---2 9 24 47
%e | | | | | |
%e 59 32 13--12--11--10 25 48
%e | | | |
%e 58 31--30--29--28--27--26 49
%e | |
%e 57--56--55--54--53--52--51--50
%p A033951:=n->4*n^2 + 3*n + 1: seq(A033951(n), n=0..100); # _Wesley Ivan Hurt_, Feb 11 2017
%t lst={};Do[p=4*n^2+3*n+1;AppendTo[lst, p], {n, 1, 6!}];lst (* _Vladimir Joseph Stephan Orlovsky_, Sep 01 2008 *)
%t LinearRecurrence[{3,-3,1},{1,8,23},60] (* _Harvey P. Dale_, Feb 07 2015 *)
%t CoefficientList[Series[(1 + 5 x + 2 x^2)/(1 - x)^3, {x, 0, 45}], x] (* _Michael De Vlieger_, Feb 12 2017 *)
%o (PARI) a(n)=4*n^2+3*n+1
%o (Python)
%o [4*n**2 + 3*n + 1 for n in range(46)] # _Michael S. Branicky_, Jan 08 2021
%Y Sequences from spirals: A001107, A002939, A007742, A033951, A033952, A033953, A033954, A033989, A033990, A033991, A002943, A033996, A033988.
%Y Sequences on the four axes of the square spiral: Starting at 0: A001107, A033991, A007742, A033954; starting at 1: A054552, A054556, A054567, A033951.
%Y Sequences on the four diagonals of the square spiral: Starting at 0: A002939 = 2*A000384, A016742 = 4*A000290, A002943 = 2*A014105, A033996 = 8*A000217; starting at 1: A054554, A053755, A054569, A016754.
%Y Sequences obtained by reading alternate terms on the X and Y axes and the two main diagonals of the square spiral: Starting at 0: A035608, A156859, A002378 = 2*A000217, A137932 = 4*A002620; starting at 1: A317186, A267682, A002061, A080335.
%Y Cf. A014848, A132774.
%K nonn,easy,nice
%O 0,2
%A Olivier Gorin (gorin(AT)roazhon.inra.fr)
%E Extended (with formula) by _Erich Friedman_