login
Numbers having more than 2 primes among the permutations of their digits.
3

%I #16 Sep 08 2022 08:45:45

%S 103,107,113,130,131,136,137,149,157,163,167,170,173,175,176,179,194,

%T 197,199,301,307,310,311,316,317,337,359,361,370,371,373,379,389,395,

%U 397,398,419,491,517,539,571,593,613,617,631,671,701,703,709,710,713

%N Numbers having more than 2 primes among the permutations of their digits.

%C Leading zeros in the permutations are ignored.

%H C. Hilliard, <a href="/A161401/a161401.txt">Comments and PARI program.</a>

%H Wikipedia,<a href="http://en.wikipedia.org/wiki/Permutation">Permutation</a>

%e 103 has three permutations of its digits 1, 0, 3 that form a prime, namely 103, 031, 013. So the count of primes for 103 is greater than 2 and 103 is in the sequence.

%t Select[Range[800],Count[FromDigits/@Permutations[ IntegerDigits[#]], _?PrimeQ]> 2&] (* _Harvey P. Dale_, Nov 24 2010 *)

%o (PARI) See Hilliard link.

%o (Magma) [ n: n in [1..720] | #[ s: s in Seqset([ Seqint([m(p[i]):i in [1..#x] ], 10): p in Permutations(Seqset(x)) ]) | IsPrime(s) ] gt 2 where m is map< x->y | [<x[i],y[i]>:i in [1..#x] ] > where x is [1..#y] where y is Intseq(n,10) ]; // _Klaus Brockhaus_, Jun 14 2009

%K base,nonn

%O 1,1

%A _Cino Hilliard_, Jun 09 2009

%E Edited by _Klaus Brockhaus_, Jun 14 2009