OFFSET
0,2
COMMENTS
Ulam's spiral (S spoke ofA054552). -Robert G. Wilson v,Oct 31 2011
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
LINKS
Ivan Panchenko,Table of n, a(n) for n = 0..1000
Robert G. Wilson v,Cover of the March 1964 issue of Scientific American
Index entries for linear recurrences with constant coefficients,signature (3,-3,1).
FORMULA
a(n) = 4*n^2 + 3*n + 1.
G.f.: (1 + 5*x + 2*x^2)/(1-x)^3.
A014848(2n+1) = a(n).
EqualsA132774* [1, 2, 3,...]; = binomial transform of [1, 7, 8, 0, 0, 0,...]. -Gary W. Adamson,Aug 28 2007
a(n) =A016754(n) - n. -Reinhard Zumkeller,May 17 2009
a(n) = a(n-1) + 8*n-1 (with a(0)=1). -Vincenzo Librandi,Nov 17 2010
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
E.g.f.: exp(x)*(1 + 7*x + 4*x^2). -Stefano Spezia,Apr 24 2024
EXAMPLE
Spiral begins:
.
65--66--67--68--69--70--71--72--73
| |
64 37--38--39--40--41--42--43 74
| | | |
63 36 17--18--19--20--21 44 75
| | | | | |
62 35 16 5---6---7 22 45 76
| | | | | | | |
61 34 15 4 1 8 23 46 77
| | | | | | | |
60 33 14 3---2 9 24 47
| | | | | |
59 32 13--12--11--10 25 48
| | | |
58 31--30--29--28--27--26 49
| |
57--56--55--54--53--52--51--50
MAPLE
MATHEMATICA
lst={}; Do[p=4*n^2+3*n+1; AppendTo[lst, p], {n, 1, 6!}]; lst (*Vladimir Joseph Stephan Orlovsky,Sep 01 2008 *)
LinearRecurrence[{3, -3, 1}, {1, 8, 23}, 60] (*Harvey P. Dale,Feb 07 2015 *)
CoefficientList[Series[(1 + 5 x + 2 x^2)/(1 - x)^3, {x, 0, 45}], x] (*Michael De Vlieger,Feb 12 2017 *)
PROG
(PARI) a(n)=4*n^2+3*n+1
(Python)
[4*n**2 + 3*n + 1 for n in range(46)] #Michael S. Branicky,Jan 08 2021
CROSSREFS
Sequences from spirals:A001107,A002939,A007742,A033951,A033952,A033953,A033954,A033989,A033990,A033991,A002943,A033996,A033988.
Sequences on the four axes of the square spiral: Starting at 0:A001107,A033991,A007742,A033954;starting at 1:A054552,A054556,A054567,A033951.
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.
KEYWORD
nonn,easy,nice
AUTHOR
Olivier Gorin (gorin(AT)roazhon.inra.fr)
EXTENSIONS
Extended (with formula) byErich Friedman
STATUS
approved