A134641 Prime permutational numbers A134640.
2, 5, 7, 11, 19
Offset: 1
Crossrefs
Cf. A134640.
Programs
-
Mathematica
a = {}; b = {}; Do[AppendTo[b, n]; w =Permutations[b]; Do[j = FromDigits[w[[m]], n + 1]; If[PrimeQ[j], AppendTo[a, j]], {m, 1, Length[w]}], {n, 0, 10}]; a (*Artur Jasinski*)
-
PARI
for(b=2,3, for(i=0,b!-1, p=fromdigits(apply(j->j-1, numtoperm(b,i)),b); if(isprime(p), print1(p", ")))) \\ Charles R Greathouse IV, Dec 14 2015
Comments