OFFSET
1,2
COMMENTS
Move in 1-3 direction in a spiral organized like A068225 etc.
Equals binomial transform of [1, 2, 8, 0, 0, 0, ...]. - Gary W. Adamson, May 03 2008
Ulam's spiral (NE spoke). - Robert G. Wilson v, Oct 31 2011
LINKS
Ivan Panchenko, Table of n, a(n) for n = 1..1000
James Grime and Brady Haran, Prime Spirals, Numberphile video (2013).
Scientific American, Cover of the March 1964 issue
Leo Tavares, Illustration: Hexagonal Dual Rays
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = 8*n + a(n-1) - 14 with n > 1, a(1)=1. - Vincenzo Librandi, Aug 07 2010
G.f.: -x*(7*x^2+1)/(x-1)^3. - Colin Barker, Sep 21 2012
From Leo Tavares, Feb 21 2022: (Start)
a(k+1) = 4k^2 - 2k + 1 in the Numberphile video. - Frank Ellermann, Mar 11 2020
E.g.f.: exp(x)*(7 - 6*x + 4*x^2) - 7. - Stefano Spezia, Apr 24 2024
MAPLE
MATHEMATICA
f[n_] := 4n^2 -10n + 7; Array[f, 40] (* Vladimir Joseph Stephan Orlovsky, Sep 01 2008 *)
PROG
(PARI) a(n)=4*n^2-10*n+7 \\ Charles R Greathouse IV, Nov 05 2013
CROSSREFS
Cf. A014105.
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
easy,nonn
AUTHOR
Enoch Haga, G. L. Honaker, Jr., Apr 10 2000
EXTENSIONS
Edited by Frank Ellermann, Feb 24 2002
STATUS
approved