Find 5 digits, which have the most numbers of prime numbers [closed]

If we have to use all available digits once, We can form 9 prime numbers from (2,5,6,7,8), they are :

(25867,28657,56827,65287,65827,82567,82657,85627,86257)

With the same rule, find another 5 digits, which have the most numbers of prime numbers. Then list all the prime numbers.

closed as off-topic by Alconja, JonMark Perry, IAmInPLS, Mithrandir, Beastly GerbilDec 21 '16 at 10:49

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is off-topic as it appears to be a mathematics problem, as opposed to a mathematical puzzle. For more info, see "Are math-textbook-style problems on topic?" on meta." – Alconja, JonMark Perry, IAmInPLS, Mithrandir, Beastly Gerbil
If this question can be reworded to fit the rules in the help center, please edit the question.

• Why is this number theory when this is purely a programming task? Unless there is some dark magic that allows someone to figure out if a number is prime given such conditions, which I sincerely doubt. – greenturtle3141 Dec 21 '16 at 4:40
• What's wrong with a programming task? Some of us programmers are bored and need something interesting to do... :) – wildBillMunson Dec 21 '16 at 4:43
• @greenturtle3141 : Ok I have deleted the number theory tag. – Jamal Senjaya Dec 21 '16 at 4:43
• @wildBillMunson I just don't see the puzzle. Here's a puzzle: How many pairs of cousin primes are there under 1,000,000? – greenturtle3141 Dec 21 '16 at 4:50
• I mean, y'all been complainin' and murderin questions and sayin they be no "AHA!" moment. Where be the "AHA!" here, then? I too can totally post programmin questions, that ain't got nothin on Project Euler 100+ stuff. But here tho? We just be taking every possible combo of 5 digits, and seeing if by mashin them we get the most possible number of primes. It's all a game of Where's the Biggest Waldo with numbers, except we tell a computer to do it. And I don't even think this is the first game of Hide n'Program Seek on PSE. Lo siento, but I got opinions and I don't believe this is a puzzle. – greenturtle3141 Dec 21 '16 at 5:05