login
A226752
Possible total sums of three 3-digit primes that together use all nonzero digits 1-9.
0
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,1
COMMENTS
Split permutations of the digits 1 through 9 into three-digit parts, treat each part as a number, and total those numbers. The sequence contains all of the possible sums.
REFERENCES
David Wells, The Penguin Dictionary of Curious and Interesting Numbers (Rev. ed. 1997), p. 149 (entry for 999).
EXAMPLE
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.
MATHEMATICA
Union[Transpose[Join[#, {Total[#]}]&/@(FromDigits/@Partition[#, 3]&/@ Select[Permutations[Range[9]], And@@PrimeQ[FromDigits/@ Partition[ #, 3]]&])][[4]]]
PROG
(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
CROSSREFS
Sequence in context: A259505 A372046 A317594 * A043527 A117720 A110401
KEYWORD
nonn,fini,full,base
AUTHOR
Harvey P. Dale, Jun 16 2013
EXTENSIONS
Name clarified by Tanya Khovanova, Jul 05 2021
STATUS
approved