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.

This page as a plain text file.
%I A337988 #25 Feb 01 2021 19:21:54
%S A337988 20,80,90,180,272,320,360,468,500,650,720,810,980,1088,1280,1332,1440,
%T A337988 1620,1872,2000,2250,2420,2448,2450,2600,2880,2900,3240,3380,3600,
%U A337988 3920,4160,4212,4352,4410,4500,5120,5328,5760,5780,5850,6480,6642,6800,7220,7290,7488,7650
%N A337988 Numbers that are the sum of the squares of two of their distinct divisors.
%H A337988 Chai Wah Wu, <a href="/A337988/b337988.txt">Table of n, a(n) for n = 1..10000</a>
%H A337988 <a href="/index/Su#ssq">Index entries for sequences related to sums of squares</a>
%e A337988 20 = 2^2 + 4^2, so 20 is in the sequence.
%t A337988 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 *)
%o A337988 (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
%o A337988 (Python)
%o A337988 from sympy import divisors, integer_nthroot
%o A337988 A337988_list = []
%o A337988 for n in range(1,10**6):
%o A337988     for d in divisors(n):
%o A337988         if 2*d*d >= n:
%o A337988             break
%o A337988         a, b = integer_nthroot(n-d*d,2)
%o A337988         if b and n % a == 0:
%o A337988             A337988_list.append(n)
%o A337988             break # _Chai Wah Wu_, Oct 30 2020
%Y A337988 Cf. A000404.
%K A337988 nonn
%O A337988 1,1
%A A337988 _Wesley Ivan Hurt_, Oct 06 2020
%E A337988 More terms from _Michel Marcus_, Oct 07 2020