login
a(n) = 2*n^2 - 2.
42

%I #115 Oct 27 2023 22:00:45

%S 0,6,16,30,48,70,96,126,160,198,240,286,336,390,448,510,576,646,720,

%T 798,880,966,1056,1150,1248,1350,1456,1566,1680,1798,1920,2046,2176,

%U 2310,2448,2590,2736,2886,3040,3198,3360,3526,3696,3870,4048,4230,4416

%N a(n) = 2*n^2 - 2.

%C a(n) is the number of edges in (n+1) X (n+1) square grid with all horizontal, vertical and great diagonal segments filled in.

%C Nonnegative X values of integer solutions to the equation 2*X^3 + 4*X^2 = Y^2. To find Y values: b(n) = 2*n*(2*n^2 - 2). - _Mohamed Bouhamida_, Nov 06 2007

%C Second term of an arithmetic progression of 5 numbers with common difference 2n+1. The sum of squares of such 5 terms equals the sum of squares of 5 consecutive numbers starting a(n) + 2n + 1. - _Carmine Suriano_, Oct 16 2013

%C For m > 2, a(m-1) = 2*m*(m-2) is the number of Hamiltonian circuits on an m-gonal bipyramid with labeled vertices. - _Stanislav Sykora_, Jul 22 2014

%C a(n+1), n >= 0, appears also as the third member of the quartet [p0(n), p1(n), a(n+1), p3(n)] of the square of [n, n+1, n+2, n+3] in the Clifford algebra Cl_2 for n >= 0. p0(n) = -A147973(n+3), p1(n) = A046092(n) and p3(n) = A139570(n). See a comment on A147973, also with a reference. - _Wolfdieter Lang_, Oct 15 2014

%C From _Bui Quang Tuan_, Mar 31 2015: (Start)

%C For n >= 2, a(n) is the total sum of all numbers on the perimeter of a square consisting of n columns, each of which contains n numbers 1, 2, 3, ..., n.

%C Here is an example with n = 5:

%C 1 1 1 1 1

%C 2 2 2 2 2

%C 3 3 3 3 3

%C 4 4 4 4 4

%C 5 5 5 5 5

%C where 1+1+1+1+1 + 2+2 + 3+3 + 4+4 + 5+5+5+5+5 = 48 = a(5).

%C (End)

%C Nonnegative k such that k/2+1 is a square. - _Bruno Berselli_, Apr 10 2018

%H G. C. Greubel, <a href="/A054000/b054000.txt">Table of n, a(n) for n = 1..5000</a>

%H Milan Janjić, <a href="https://www.emis.de/journals/JIS/VOL21/Janjic2/janjic103.html">Pascal Matrices and Restricted Words</a>, J. Int. Seq., Vol. 21 (2018), Article 18.5.2.

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1).

%F a(n) = 4*n + a(n-1) - 2, with n>1, a(1)=0. - _Vincenzo Librandi_, Aug 06 2010

%F a(1)=0, a(2)=6, a(3)=16; for n>3, a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - _Harvey P. Dale_, Feb 03 2012

%F a(n) = (n+i)^2 + (n-i)^2, where i=sqrt(-1). - _Bruno Berselli_, Jan 23 2014

%F a(n) = 1*A000290(n-1) + 2*A000217(n-1) + 3*A001477(n-1). - _J. M. Bergot_, Apr 23 2014

%F G.f.: 2*x^2*(3 - x)/(1 - x)^3. - _Vincenzo Librandi_, Apr 01 2015

%F E.g.f.: 2*(x^2 + x -1)*exp(x) + 2. - _G. C. Greubel_, Jul 13 2017

%F a(n) + a(n+2) = A005843(n+1)^2. - _Ezhilarasu Velayutham_, May 30 2019

%F From _Amiram Eldar_, Dec 09 2021: (Start)

%F Sum_{n>=2} 1/a(n) = 3/8.

%F Sum_{n>=2} (-1)^n/a(n) = 1/8. (End)

%e For n=5, a(5)=48 and 37^2 + 48^2 + 59^2 + 70^2 + 81^2 = 59^2 + 60^2 + 61^2 + 62^2 + 63^2. - _Carmine Suriano_, Oct 16 2013

%p [ seq(2*n^2 - 2, n=1..60) ];

%t 2 Range[50]^2 - 2 (* or *) LinearRecurrence[{3, -3, 1}, {0, 6, 16}, 50] (* _Harvey P. Dale_, Feb 03 2012 *)

%t CoefficientList[Series[2 x (3 - x) / (1 - x)^3, {x, 0, 50}], x] (* _Vincenzo Librandi_, Apr 01 2015 *)

%o (PARI) a(n)=2*n^2-2 \\ _Charles R Greathouse IV_, Sep 24 2015

%Y a(n) = A100345(n+1, n-4) for n>2.

%Y Cf. A000217, A001082, A002378, A002943, A005563, A028347, A036666, A046092, A056220, A062717, A067725, A087475.

%K nonn,easy

%O 1,2

%A _Asher Auel_, Jan 12 2000