A226752 Possible total sums of three 3-digit primes that together use all nonzero digits 1-9.
999, 1089, 1107, 1197, 1269, 1287, 1323, 1341, 1359, 1377, 1413, 1431, 1449, 1467, 1521, 1539, 1557, 1593, 1611, 1629, 1647, 1683, 1701, 1737, 1773, 1791, 1809, 1827, 1863, 1881, 1899, 1917, 1953, 1971, 1989, 2007, 2043, 2061, 2133, 2151, 2223, 2241, 2331, 2421
Offset: 1
Examples
149 + 263 + 587 = 999, and 149, 263, and 587 are all primes, so 999 is a (the smallest) term of the sequence. 653 + 827 + 941 = 2421, and 653, 827, and 941 are all primes, so 2421 is a (the largest) term of the sequence.
References
- David Wells, The Penguin Dictionary of Curious and Interesting Numbers (Rev. ed. 1997), p. 149 (entry for 999).
Crossrefs
Cf. A226772
Programs
-
Mathematica
Union[Transpose[Join[#,{Total[#]}]&/@(FromDigits/@Partition[#,3]&/@ Select[Permutations[Range[9]],And@@PrimeQ[FromDigits/@ Partition[ #,3]]&])][[4]]]
-
Python
from sympy import isprime from itertools import permutations aset = set() for p in permutations("123456789"): p = [int("".join(p[i*3:(i+1)*3])) for i in range(3)] if all(isprime(pi) for pi in p): aset.add(sum(p)) print(sorted(aset)) # Michael S. Branicky, Jun 28 2021
Extensions
Name clarified by Tanya Khovanova, Jul 05 2021
Comments