login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A120413 Largest even number strictly less than n^2. 1

%I #24 Jun 14 2019 00:35:04

%S 0,2,8,14,24,34,48,62,80,98,120,142,168,194,224,254,288,322,360,398,

%T 440,482,528,574,624,674,728,782,840,898,960,1022,1088,1154,1224,1294,

%U 1368,1442,1520,1598,1680,1762,1848,1934,2024,2114,2208,2302,2400,2498,2600

%N Largest even number strictly less than n^2.

%C Longest non-intersecting route from (0, 0) to (n - 1, n - 1) staying in an (n - 1) X (n - 1) box (shortest route is length 2n A005843).

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

%F a(n) = 2*ceiling[n^2/2] - 2 = 2*A074148(n) = A085046(n) - 1.

%F From _Colin Barker_, Jul 29 2012: (Start)

%F a(n) = (-1 + (-1)^n + 4*n + 2*n^2)/2.

%F a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4).

%F G.f.: 2*x*(1 + 2*x - x^2)/((1-x)^3*(1+x)). (End)

%F a(n) = n^2 - 2 for even n; a(n) = n^2 - 1 for odd n. -_Dennis P. Walsh_, Apr 15 2016

%p seq(2*ceil(n^2/2)-2,n=1..50);

%t Flatten[Table[{(2n - 1)^2 - 1, 4n^2 - 2}, {n, 25}]] (* _Alonso del Arte_, Apr 15 2016 *)

%o (PARI) lista(nn) = for(n=0, nn, print1((-1+(-1)^n+4*n+2*n^2)/2, ", ")); \\ _Altug Alkan_, Apr 15 2016

%K easy,nonn

%O 1,2

%A _Henry Bottomley_, Jul 06 2006

%E Offset corrected by _N. J. A. Sloane_, Apr 15 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)