OFFSET
1,2
COMMENTS
Move in 1-7 direction in a spiral organized like A068225 etc.
Third row of A082039. - Paul Barry, Apr 02 2003
Inverse binomial transform of A036826. - Paul Barry, Jun 11 2003
Equals the "middle sequence" T(2*n,n) of the Connell sequence A001614 as a triangle. - Johannes W. Meijer, May 20 2011
Ulam's spiral (SW spoke). - Robert G. Wilson v, Oct 31 2011
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..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+1) = 4*n^2 + 2*n + 1. - Paul Barry, Apr 02 2003
a(n) = 4*n^2 - 6*n+3 - 3*0^n (with leading zero). - Paul Barry, Jun 11 2003
Binomial transform of [1, 6, 8, 0, 0, 0, ...]. - Gary W. Adamson, Dec 28 2007
a(n) = 8*n + a(n-1) - 10 (with a(1)=1). - Vincenzo Librandi, Aug 07 2010
From Colin Barker, Mar 23 2012: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
G.f.: x*(1+x)*(1+3*x)/(1-x)^3. (End)
E.g.f.: -3 + (3 - 2*x + 4*x^2)*exp(x). - G. C. Greubel, Jul 04 2019
Sum_{n>=1} 1/a(n) = A339237. - R. J. Mathar, Jan 22 2021
MATHEMATICA
f[n_]:= 4*n^2-6*n+3; Array[f, 50] (* Vladimir Joseph Stephan Orlovsky, Sep 02 2008 *)
LinearRecurrence[{3, -3, 1}, {1, 7, 21}, 50] (* Harvey P. Dale, Nov 17 2012 *)
PROG
(PARI) a(n)=4*n^2-6*n+3 \\ Charles R Greathouse IV, Sep 24 2015
(Magma) [4*n^2-6*n+3: n in [1..50]]; // G. C. Greubel, Jul 04 2019
(Sage) [4*n^2-6*n+3 for n in (1..50)] # G. C. Greubel, Jul 04 2019
(GAP) List([1..50], n-> 4*n^2-6*n+3) # G. C. Greubel, Jul 04 2019
CROSSREFS
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