OFFSET
1,2
COMMENTS
Move in 1-4 direction in a spiral organized like A068225 etc.
Equals binomial transform of [1, 3, 8, 0, 0, 0, ...]. - Gary W. Adamson, Apr 30 2008
Ulam's spiral (N spoke). - Robert G. Wilson v, Oct 31 2011
Also, numbers of the form m*(4*m+1)+1 for nonpositive m. - Bruno Berselli, Jan 06 2016
LINKS
Ivan Panchenko, Table of n, a(n) for n = 1..1000
Franck Ramaharo, Statistics on some classes of knot shadows, arXiv:1802.07701 [math.CO], 2018.
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)^2 = Sum_{i = 0..2*(4*n-5)} (4*n^2-13*n+9+i)^2*(-1)^i = ((n-1)*(4*n-5)+1)^2. - Bruno Berselli, Apr 29 2010
From Harvey P. Dale, Aug 21 2011: (Start)
a(0)=1, a(1)=4, a(2)=15; for n > 2, a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
G.f.: -x*(6*x^2+x+1)/(x-1)^3. (End)
From Franck Maminirina Ramaharo, Mar 09 2018: (Start)
a(n) = binomial(2*n - 2, 2) + 2*(n - 1)^2 + 1.
E.g.f.: exp(x)*(6 - 5*x + 4*x^2) - 6. - Stefano Spezia, Apr 24 2024
MAPLE
a:=n->4*n^2-9*n+6: seq(a(n), n=1..50); # Muniru A Asiru, Mar 09 2018
MATHEMATICA
a[n_] := 4*n^2 - 9*n + 6; Array[a, 40] (* Vladimir Joseph Stephan Orlovsky, Sep 01 2008 *)
LinearRecurrence[{3, -3, 1}, {1, 4, 15}, 50] (* Harvey P. Dale, Sep 06 2015 *)
CoefficientList[Series[-(6x^2 + x + 1)/(x - 1)^3, {x, 0, 49}], x] (* Robert G. Wilson v, Mar 12 2018 *)
PROG
(PARI) a(n)=4*n^2-9*n+6 \\ Charles R Greathouse IV, Sep 24 2015
(Magma) [4*n^2-9*n+6 : n in [1..50]]; // Vincenzo Librandi, Mar 10 2018
CROSSREFS
Cf. A266883: m*(4*m+1)+1 for m = 0,-1,1,-2,2,-3,3,...
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
AUTHOR
Enoch Haga, G. L. Honaker, Jr., Apr 10 2000
EXTENSIONS
Edited by Frank Ellermann, Feb 24 2002
Incorrect formula deleted by N. J. A. Sloane, Aug 02 2009
STATUS
approved