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.

A226752 Possible total sums of three 3-digit primes that together use all nonzero digits 1-9.

This page as a plain text file.
%I A226752 #20 Jul 10 2021 00:18:53
%S A226752 999,1089,1107,1197,1269,1287,1323,1341,1359,1377,1413,1431,1449,1467,
%T A226752 1521,1539,1557,1593,1611,1629,1647,1683,1701,1737,1773,1791,1809,
%U A226752 1827,1863,1881,1899,1917,1953,1971,1989,2007,2043,2061,2133,2151,2223,2241,2331,2421
%N A226752 Possible total sums of three 3-digit primes that together use all nonzero digits 1-9.
%C A226752 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 A226752 David Wells, The Penguin Dictionary of Curious and Interesting Numbers (Rev. ed. 1997), p. 149 (entry for 999).
%e A226752 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 A226752 Union[Transpose[Join[#,{Total[#]}]&/@(FromDigits/@Partition[#,3]&/@ Select[Permutations[Range[9]],And@@PrimeQ[FromDigits/@ Partition[ #,3]]&])][[4]]]
%o A226752 (Python)
%o A226752 from sympy import isprime
%o A226752 from itertools import permutations
%o A226752 aset = set()
%o A226752 for p in permutations("123456789"):
%o A226752     p = [int("".join(p[i*3:(i+1)*3])) for i in range(3)]
%o A226752     if all(isprime(pi) for pi in p): aset.add(sum(p))
%o A226752 print(sorted(aset)) # _Michael S. Branicky_, Jun 28 2021
%Y A226752 Cf. A226772
%K A226752 nonn,fini,full,base
%O A226752 1,1
%A A226752 _Harvey P. Dale_, Jun 16 2013
%E A226752 Name clarified by _Tanya Khovanova_, Jul 05 2021