%I #284 Mar 15 2024 23:16:41
%S -1,1,7,17,31,49,71,97,127,161,199,241,287,337,391,449,511,577,647,
%T 721,799,881,967,1057,1151,1249,1351,1457,1567,1681,1799,1921,2047,
%U 2177,2311,2449,2591,2737,2887,3041,3199,3361,3527,3697,3871,4049,4231,4417,4607,4801
%N a(n) = 2*n^2 - 1.
%C Image of squares (A000290) under "little Hankel" transform that sends [c_0, c_1, ...] to [d_0, d_1, ...] where d_n = c_n^2 - c_{n+1}*c_{n-1}. - _Henry Bottomley_, Dec 12 2000
%C Surround numbers of an n X n square. - _Jason Earls_, Apr 16 2001
%C Numbers n such that 2*n + 2 is a perfect square. - _Cino Hilliard_, Dec 18 2003, _Juri-Stepan Gerasimov_, Apr 09 2016
%C The sums of the consecutive integer sequences 2n^2 to 2(n+1)^2-1 are cubes, as 2n^2 + ... + 2(n+1)^2-1 = (1/2)(2(n+1)^2 - 1 - 2n^2 + 1)(2(n+1)^2 - 1 + 2n^2) = (2n+1)^3. E.g., 2+3+4+5+6+7 = 27 = 3^3, then 8+9+10+...+17 = 125 = 5^3. - Andras Erszegi (erszegi.andras(AT)chello.hu), Apr 29 2005
%C X values (other than 0) of solutions to the equation 2*X^3 + 2*X^2 = Y^2. To find Y values: b(n) = 2n*(2*n^2 - 1). - _Mohamed Bouhamida_, Nov 06 2007
%C Average of the squares of two consecutive terms is also a square. In fact: (2*n^2 - 1)^2 + (2*(n+1)^2 - 1)^2 = 2*(2*n^2 + 2*n + 1)^2. - Matias Saucedo (solomatias(AT)yahoo.com.ar), Aug 18 2008
%C Equals row sums of triangle A143593 and binomial transform of [1, 6, 4, 0, 0, 0, ...] with n > 1. - _Gary W. Adamson_, Aug 26 2008
%C Start a spiral of square tiles. Trivially the first tile fits in a 1 X 1 square. 7 tiles fit in a 3 X 3 square, 17 tiles fit in a 5 X 5 square and so on. - _Juhani Heino_, Dec 13 2009
%C Let A be the Hessenberg matrix of order n, defined by: A[1,j]=1, A[i,i]:=-2, A[i,i-1]=-1, and A[i,j]=0 otherwise. Then, for n >= 1, a(n) = coeff(charpoly(A,x),x^(n-2)). - _Milan Janjic_, Jan 26 2010
%C For each n > 0, the recursive series, formula S(b) = 6*S(b-1) - S(b-2) - 2*a(n) with S(0) = 4n^2-4n+1 and S(1) = 2n^2, has the property that every even term is a perfect square and every odd term is twice a perfect square. - _Kenneth J Ramsey_, Jul 18 2010
%C Fourth diagonal of A154685 for n > 2. - _Vincenzo Librandi_, Aug 07 2010
%C First integer of (2*n)^2 consecutive integers, where the last integer is 3 times the first + 1. As example, n = 2: term = 7; (2*n)^2 = 16; 7, 8, 9, ..., 20, 21, 22: 7*3 + 1 = 22. - _Denis Borris_, Nov 18 2012
%C Chebyshev polynomial of the first kind T(2,n). - _Vincenzo Librandi_, May 30 2014
%C For n > 0, number of possible positions of a 1 X 2 rectangle in a (n+1) X (n+2) rectangular integer lattice. - _Andres Cicuttin_, Apr 07 2016
%C This sequence also represents the best solution for Ripà's n_1 X n_2 X n_3 dots problem, for any 0 < n_1 = n_2 < n_3 = floor((3/2)*(n_1 - 1)) + 1. - _Marco Ripà_, Jul 23 2018
%H Reinhard Zumkeller, <a href="/A056220/b056220.txt">Table of n, a(n) for n = 0..10000</a>
%H Jeremiah Bartz, Bruce Dearden, and Joel Iiams, <a href="https://arxiv.org/abs/1810.07895">Classes of Gap Balancing Numbers</a>, arXiv:1810.07895 [math.NT], 2018.
%H Milan Janjić, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL13/Janjic/janjic33.html">Hessenberg Matrices and Integer Sequences</a>, J. Int. Seq., Vol. 13 (2010), Article # 10.7.8.
%H Mitch Phillipson, Manda Riehl, and Tristan Williams, <a href="http://puma.dimai.unifi.it/21_2/11_Phillipson_Riehl_Williams.pdf">Enumeration of Wilf classes in Sn ~ Cr for two patterns of length 3</a>, PU. M. A., Vol. 21, No. 2 (2010), pp. 321-338.
%H Marco Ripà, <a href="http://nntdm.net/papers/nntdm-20/NNTDM-20-1-59-71.pdf">The rectangular spiral or the n1 X n2 X ... X nk Points Problem </a>, Notes on Number Theory and Discrete Mathematics, Vol. 20, No. 1 (2014), pp. 59-71.
%H Leo Tavares, <a href="/A056220/a056220.jpg">Illustration: Twin Squares</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1).
%F G.f.: (-1 + 4*x + x^2)/(1-x)^3. - _Henry Bottomley_, Dec 12 2000
%F a(n) = A119258(n+1,2) for n > 0. - _Reinhard Zumkeller_, May 11 2006
%F From _Doug Bell_, Mar 08 2009: (Start)
%F a(0) = -1,
%F a(n) = sqrt(A001844(n)^2 - A069074(n-1)),
%F a(n+1) = sqrt(A001844(n)^2 + A069074(n-1)) = sqrt(a(n)^2 + A069074(n-1)*2). (End)
%F a(n) + a(n+1) + 1 = (2n+1)^2. - _Doug Bell_, Mar 09 2009
%F a(n) = a(n-1) + 4*n - 2 (with a(0)=-1). - _Vincenzo Librandi_, Dec 25 2010
%F a(n) = A188653(2*n) for n > 0. - _Reinhard Zumkeller_, Apr 13 2011
%F a(n) = A162610(2*n-1,n) for n > 0. - _Reinhard Zumkeller_, Jan 19 2013
%F a(n) = Sum_{k=0..2} ( (C(n+k,3)-(C(n+k-1,3))*(C(n+k,3)+ C(n+k+1,3)) ) - (C(n+2,3)-C(n-1,3))*(C(n,3)+C(n+3,3)), for n > 3. - _J. M. Bergot_, Jun 16 2014
%F a(n) = j^2 + k^2 - 2 or 2*j*k if n >= 2 and j = n + sqrt(2)/2 and k = n - sqrt(2)/2. - _Avi Friedlich_, Mar 30 2015
%F a(n) = A002593(n)/n^2. - _Bruce J. Nicholson_, Apr 03 2017
%F a(n) = A000384(n) + n - 1. - _Bruce J. Nicholson_, Nov 12 2017
%F a(n)*a(n+k) + 2k^2 = m^2 (a perfect square), m = a(n) + (2n*k), for n>=1. - _Ezhilarasu Velayutham_, May 13 2019
%F From _Amiram Eldar_, Aug 10 2020: (Start)
%F Sum_{n>=1} 1/a(n) = 1/2 - sqrt(2)*Pi*cot(Pi/sqrt(2))/4.
%F Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt(2)*Pi*csc(Pi/sqrt(2))/4 - 1/2. (End)
%F From _Amiram Eldar_, Feb 04 2021: (Start)
%F Product_{n>=1} (1 + 1/a(n)) = (Pi/sqrt(2))*csc(Pi/sqrt(2)).
%F Product_{n>=2} (1 - 1/a(n)) = (Pi/(4*sqrt(2)))*csc(Pi/sqrt(2)). (End)
%F a(n) = A003215(n) - A000217(n-2)*2. - _Leo Tavares_, Jun 29 2021
%F Let T(n) = n*(n+1)/2. Then a(n)^2 = T(2n-2)*T(2n+1) + n^2. - _Charlie Marion_, Feb 12 2023
%F E.g.f.: exp(x)*(2*x^2 + 2*x - 1). - _Stefano Spezia_, Jul 08 2023
%e a(0) = 0^2-1*1 = -1, a(1) = 1^2 - 4*0 = 1, a(2) = 2^2 - 9*1 = 7, etc.
%e a(4) = 31 = (1, 3, 3, 1) dot (1, 6, 4, 0) = (1 + 18 + 12 + 0). - _Gary W. Adamson_, Aug 29 2008
%p A056220:=n->2*n^2-1; seq(A056220(n), n=0..50); # _Wesley Ivan Hurt_, Jun 16 2014
%t Array[2 #^2 - 1 &, 50, 0] (* _Robert G. Wilson v_, Jul 23 2018 *)
%t CoefficientList[Series[(x^2 +4x -1)/(1-x)^3, {x, 0, 50}], x] (* or *)
%t LinearRecurrence[{3, -3, 1}, {-1, 1, 7}, 51] (* _Robert G. Wilson v_, Jul 24 2018 *)
%o (PARI) a(n)=2*n^2-1;
%o (Magma) [2*n^2-1 : n in [0..50]]; // _Vincenzo Librandi_, May 30 2014
%o (GAP) List([0..50], n-> 2*n^2-1); # _Muniru A Asiru_, Jul 24 2018
%o (Sage) [2*n^2-1 for n in (0..50)] # _G. C. Greubel_, Jul 07 2019
%Y Cf. A000105, A000217, A000290, A000384, A001082, A001653, A001844, A002378, A002593, A003215, A005563, A028347, A036666, A046092, A047875, A062717, A069074, A077585, A087475, A119258, A143593, A154685, A162610, A188653, A225227.
%Y Cf. A066049 (indices of prime terms)
%Y Column 2 of array A188644 (starting at offset 1).
%K sign,easy
%O 0,3
%A _N. J. A. Sloane_, Aug 06 2000