A052494 Number of different primes that can be formed by permuting digits of n-th prime.
1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 1, 1, 2, 1, 3, 2, 3, 3, 2, 4, 1, 3, 3, 3, 3, 4, 2, 2, 2, 4, 3, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 1, 3, 2, 3, 2, 3, 2, 2, 1, 3, 2, 3, 4, 1, 3, 4, 1, 1, 4, 2, 1, 1, 2, 1, 1, 2, 2, 2, 2, 2, 1, 4, 1, 1, 1, 2, 1, 1, 2, 1, 2, 2, 3
Offset: 2
Examples
a(75)=4 because the digits in 379 may be arranged to form a total of 4 primes: 379, 397, 739 and 937.
Programs
-
Mathematica
ndp[n_]:=Module[{pers=FromDigits/@Permutations[IntegerDigits[n]]}, Count[ pers,?(IntegerLength[#]==IntegerLength[n]&&PrimeQ[#]&)]]; ndp/@ Prime[ Range[110]] (* _Harvey P. Dale, Dec 17 2012 *)
Comments