cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A337988 Numbers that are the sum of the squares of two of their distinct divisors.

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, Oct 06 2020

Keywords

Examples

			20 = 2^2 + 4^2, so 20 is in the sequence.
		

Crossrefs

Cf. A000404.

Programs

  • 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 *)
  • 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

Extensions

More terms from Michel Marcus, Oct 07 2020