login
A337988
Numbers that are the sum of the squares of two of their distinct divisors.
2
20, 80, 90, 180, 272, 320, 360, 468, 500, 650, 720, 810, 980, 1088, 1280, 1332, 1440, 1620, 1872, 2000, 2250, 2420, 2448, 2450, 2600, 2880, 2900, 3240, 3380, 3600, 3920, 4160, 4212, 4352, 4410, 4500, 5120, 5328, 5760, 5780, 5850, 6480, 6642, 6800, 7220, 7290, 7488, 7650
OFFSET
1,1
EXAMPLE
20 = 2^2 + 4^2, so 20 is in the sequence.
MATHEMATICA
Select[Range[10^4], 1 == Catch@ Do[Do[If[#2[[i]]^2 + #2[[j]]^2 == #1, Throw[1]], {j, i + 1, #3}], {i, #3}] & @@ {#, Divisors[#], DivisorSigma[0, #]} &] (* Michael De Vlieger, Oct 10 2020 *)
PROG
(PARI) isok(m) = {my(d=divisors(m)); for (i=2, #d, for (j=1, i-1, if (d[i]^2+d[j]^2 == m, return (1)); ); ); } \\ Michel Marcus, Oct 07 2020
(Python)
from sympy import divisors, integer_nthroot
A337988_list = []
for n in range(1, 10**6):
for d in divisors(n):
if 2*d*d >= n:
break
a, b = integer_nthroot(n-d*d, 2)
if b and n % a == 0:
A337988_list.append(n)
break # Chai Wah Wu, Oct 30 2020
CROSSREFS
Cf. A000404.
Sequence in context: A083127 A211613 A292360 * A002609 A195322 A200424
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Oct 06 2020
EXTENSIONS
More terms from Michel Marcus, Oct 07 2020
STATUS
approved