OFFSET
1,1
COMMENTS
No digit is on its "right" place. There are exactly 143 such primes.
The only another possible case: four-digit primes with a derangement of digits 1..4 gives two primes 2143, 2341. There are no such primes with m=1,2,3,5,6,8,9 decimal digits 1..m.
LINKS
Zak Seidov, Table of n, a(n) for n = 1..143 (complete list)
EXAMPLE
2365471 is prime and 2 is not at 2nd place, 3 - not at 3rd place, 6 - not at 6th place, ..., 1 - not at the first place. Largest such prime is a(143)=7652413.
MATHEMATICA
derangQ[n_]:=Count[Thread[{n, Range[7]}], _?(#[[1]]==#[[2]]&)]==0; With[ {p7=Permutations[Range[7]]}, Select[p7, derangQ[#]&&PrimeQ[ FromDigits[ #]]&]] (* Harvey P. Dale, Sep 28 2017 *)
CROSSREFS
KEYWORD
nonn,base,fini,full
AUTHOR
Zak Seidov, Mar 01 2011
STATUS
approved