Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #20 Jul 10 2021 00:18:53
%S 999,1089,1107,1197,1269,1287,1323,1341,1359,1377,1413,1431,1449,1467,
%T 1521,1539,1557,1593,1611,1629,1647,1683,1701,1737,1773,1791,1809,
%U 1827,1863,1881,1899,1917,1953,1971,1989,2007,2043,2061,2133,2151,2223,2241,2331,2421
%N Possible total sums of three 3-digit primes that together use all nonzero digits 1-9.
%C 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.
%D David Wells, The Penguin Dictionary of Curious and Interesting Numbers (Rev. ed. 1997), p. 149 (entry for 999).
%e 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.
%t Union[Transpose[Join[#,{Total[#]}]&/@(FromDigits/@Partition[#,3]&/@ Select[Permutations[Range[9]],And@@PrimeQ[FromDigits/@ Partition[ #,3]]&])][[4]]]
%o (Python)
%o from sympy import isprime
%o from itertools import permutations
%o aset = set()
%o for p in permutations("123456789"):
%o p = [int("".join(p[i*3:(i+1)*3])) for i in range(3)]
%o if all(isprime(pi) for pi in p): aset.add(sum(p))
%o print(sorted(aset)) # _Michael S. Branicky_, Jun 28 2021
%Y Cf. A226772
%K nonn,fini,full,base
%O 1,1
%A _Harvey P. Dale_, Jun 16 2013
%E Name clarified by _Tanya Khovanova_, Jul 05 2021