Svoboda | Graniru | BBC Russia | Golosameriki | Facebook
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!)
A087059 Difference between 2*n^2 and the next greater square number. 10
2, 1, 7, 4, 14, 9, 2, 16, 7, 25, 14, 1, 23, 8, 34, 17, 47, 28, 7, 41, 18, 56, 31, 4, 46, 17, 63, 32, 82, 49, 14, 68, 31, 89, 50, 9, 71, 28, 94, 49, 2, 72, 23, 97, 46, 124, 71, 16, 98, 41, 127, 68, 7, 97, 34, 128, 63, 161, 94, 25, 127, 56, 162, 89, 14, 124, 47, 161, 82, 1, 119 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
For n >= 2, a(n) is also the smallest absolute value of all negative values in row n of the triangle D(n, m) = n^2 - m^2 - 2*n*m, for 2 <= m + 1 <= n. The negative values in row n start with m = floor(n/(1 + sqrt(2))) + 1 = ceiling(n/(1 + sqrt(2))). See also a comment on A087056 for the smallest positive numbers in row n >= 3. - Wolfdieter Lang, Jun 11 2015
LINKS
FORMULA
a(n) = A087058(n) - 2*n^2 = A087057(n)^2 - 2*n^2 = (1 + A001951(n))^2 - 2*n^2 = (1 + floor(n*sqrt(2)))^2 - 2*n^2.
a(n) = 2*c(n)^2 - (n - c(n))^2, with c(n) := ceiling(n/(1 + sqrt(2))), n >= 1. - Wolfdieter Lang, Jun 11 2015
EXAMPLE
a(10) = 25 because the difference between 2*10^2 = 200 and the next greater square number (225) is 25.
MATHEMATICA
(Floor[Sqrt[#]]+1)^2-#&/@Table[2n^2, {n, 80}] (* Harvey P. Dale, Jan 15 2023 *)
PROG
(PARI) a(n) = (1 + sqrtint(2*n^2))^2 - 2*n^2 \\ Michel Marcus, Jun 25 2013
CROSSREFS
Sequence in context: A075085 A217458 A124048 * A120872 A204771 A141512
KEYWORD
easy,nonn
AUTHOR
Jens Voß, Aug 07 2003
STATUS
approved

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 September 11 17:23 EDT 2024. Contains 375839 sequences. (Running on oeis4.)