The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A363761 a(n) is the least k < 3*n such that there are exactly n distinct numbers j that can be expressed as sum of two squares with k^2 < j < (k+1)^2, or -1 if such a k does not exist. 5
0, 1, 2, 4, 5, 7, 8, 10, 13, 12, 15, 17, 19, 23, 21, 24, 25, 28, 32, 31, 34, 37, 39, 44, 41, 43, 45, 50, 51, 48, 57, 55, 56, 59, 64, 63, 68, 69, 74, 77, 78, 75, 72, 80, 88, 84, -1, 94, 89, 96, 93, 99, 97, 102, 108, -1, 106, 111, 110, 113, 117, 120, -1, 123, 133, 127, 130, 137, 142, 138, 139, -1, 135 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
If a(n) != -1, then a(n) >= n/2. - Chai Wah Wu, Jun 22 2023
a(n) = A363763(n) for n <= 11459.
a(n) = -1 for n > 15898.
PROG
(PARI) a363761(upto) = {for (n=0, upto, my(kfound=-1);
for (k=0, 3*n, my(k1=k^2+1, k2=k*(k+2), m=0);
for (j=k1, k2, m+= (sumdiv(j, d, (d%4==1)-(d%4==3))>0); if (m>n, break));
if (m==n, kfound=k; break); if (m==n, kfound=k; break)); print1(kfound, ", "))};
a363761(75)
(Python)
from sympy import factorint
def A363761(n):
for k in range(n>>1, 3*n):
c = 0
for m in range(k**2+1, (k+1)**2):
if all(p==2 or p&3==1 or e&1^1 for p, e in factorint(m).items()):
c += 1
if c>n:
break
if c==n:
return k
return -1 # Chai Wah Wu, Jun 22 2023
CROSSREFS
Identical with A363763 for n <= 11459, but increasingly different afterwards, i.e., a(11460) = -1, whereas A363763(11460) = 34451.
Sequence in context: A248566 A091627 A160830 * A363763 A189303 A192817
KEYWORD
sign
AUTHOR
Hugo Pfoertner, Jun 22 2023
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 May 21 00:14 EDT 2024. Contains 372720 sequences. (Running on oeis4.)