A380098 Numbers whose sum of cubes of distinct prime factors is prime.
165, 210, 390, 399, 420, 462, 495, 561, 570, 595, 615, 630, 651, 780, 798, 825, 840, 924, 957, 1050, 1085, 1140, 1170, 1173, 1197, 1218, 1235, 1245, 1260, 1302, 1386, 1435, 1470, 1482, 1485, 1495, 1554, 1560, 1596, 1615, 1680, 1683, 1705, 1710, 1767, 1771, 1815, 1845, 1848, 1885, 1890, 1938, 1950, 1953
Offset: 1
Keywords
Examples
165=3*5*11 and 3^3 + 5^3 + 11^3 = 1483, which is prime. Therefore, 165 is included.
Programs
-
Maple
a:=proc(n) local DPF: DPF:=factorset(n): if isprime(sum(DPF[j]^3, j=1..nops(DPF)))=true then n else fi end: seq(a(n), n=1..2000);
-
Mathematica
Select[Range[2000], PrimeQ[Total[Transpose[FactorInteger[#]][[1]]^3]]&]
-
Python
from sympy import isprime, factorint def ok(n): return isprime(sum(p**3 for p in factorint(n))) print([k for k in range(2000) if ok(k)]) # Michael S. Branicky, Jan 12 2025
Comments