A007933 Some permutation of digits is a prime.
2, 3, 5, 7, 11, 13, 14, 16, 17, 19, 20, 23, 29, 30, 31, 32, 34, 35, 37, 38, 41, 43, 47, 50, 53, 59, 61, 67, 70, 71, 73, 74, 76, 79, 83, 89, 91, 92, 95, 97, 98, 101, 103, 104, 106, 107, 109, 110, 112, 113, 115, 118, 119, 121, 124, 125, 127, 128, 130, 131, 133
Offset: 1
References
- M. Le, On Smarandache Pseudo-Primes of Second Kind, Smarandache Notions Journal, Vol. 10, No. 1-2-3, 1999, 180.
Links
- Eric M. Schmidt, Table of n, a(n) for n = 1..10000
- F. Smarandache, Only Problems, Not Solutions!.
Programs
-
Mathematica
t ={};Do[list1 = Permutations[IntegerDigits[n]];If[Length[Select[Table[FromDigits[n],{n,list1}], PrimeQ]] > 0,AppendTo[t, n]], {n, 133}]; t (* Jayanta Basu, Apr 24 2013 *) Select[Range@ 133, AnyTrue[FromDigits /@ Permutations@ IntegerDigits@ #, PrimeQ] &] (* Michael De Vlieger, Jul 14 2015, Version 10 *)
-
PARI
is(n)=if(n%3==0, return(n/10^valuation(n,10)==3)); my(d=digits(n),t=#d); for(i=0,t!-1, if(isprime(fromdigits(vecextract(d,numtoperm(t,i)))), return(1))); 0 \\ Charles R Greathouse IV, Jul 14 2015
Comments