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!)
A087056 Difference between 2 * n^2 and the next smaller square number. 11

%I #18 Jul 09 2020 07:23:30

%S 1,4,2,7,1,8,17,7,18,4,17,32,14,31,9,28,2,23,46,16,41,7,34,63,25,56,

%T 14,47,1,36,73,23,62,8,49,92,34,79,17,64,113,47,98,28,81,7,62,119,41,

%U 100,18,79,142,56,121,31,98,4,73,144,46,119,17,92,169,63,142,32,113,196,82

%N Difference between 2 * n^2 and the next smaller square number.

%C The difference x - y between the legs of primitive Pythagorean triangles x^2 + y^2 = z^2 with even y is D(n, m) = n^2 - m^2 - 2*n*m (see A249866 for the restrictions on n and m to have primitive triangles, which are not used here except for 1 < = m <= n-1). Here a(n) is for positive D values the smallest number in row n, namely D(n, floor(n/(1 + sqrt(2))), for n >= 3. For the smallest value |D| for negative D in row n >= 2 see A087059. - _Wolfdieter Lang_, Jun 11 2015

%F a(n) = 2*n^2 - A087055(n) = 2*n^2 - A001951(n)^2 = 2*n^2 - (floor[n*sqrt(2)])^2

%F a(n) = (n - f(n))^2 - 2*f(n)^2 with f(n) = floor(n/(1 + sqrt(2)), for n >= 1 (the values for n = 1, 2 have here been included). See comment above. - _Wolfdieter Lang_, Jun 11 2015

%e a(10) = 4 because the difference between 2*10^2 = 200 and the next smaller square number (196) is 4.

%o (PARI) a(n) = 2*n^2 - sqrtint(2*n^2)^2; \\ _Michel Marcus_, Jul 08 2020

%Y Cf. A001951, A087055, A087057, A087058, A087059, A087060.

%K easy,nonn

%O 1,2

%A _Jens Voß_, Aug 07 2003

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 26 21:53 EDT 2024. Contains 372004 sequences. (Running on oeis4.)