OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = 1037 because 1037 is composite and 137, 173, 317, 1307, 3701, 7013, and 7103 are prime permutations, and no other permutation of 1037 is prime.
MAPLE
filter:= proc(n) local d, Permutor, P, c, i;
if isprime(n) then return false fi;
d:= ilog10(n)+1;
Permutor:= Iterator:-Permute(convert(n, base, 10));
c:= 0;
for P in Permutor do
if isprime(add(P[i]*10^(i-1), i=1..d)) then
c:= c+1;
if c >= 8 then return false fi;
fi
od;
evalb(c=7)
end proc:
select(filter, [$10..3000]); # Robert Israel, Dec 31 2025
MATHEMATICA
Select[Range[3000], !PrimeQ[#]&&Count[Union[FromDigits/@ Permutations[ IntegerDigits[ #]]], _?PrimeQ]==7&] (* Harvey P. Dale, Apr 16 2013 *)
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Gil Broussard, Jul 30 2009
EXTENSIONS
Example moved from Maple field to Example field by Harvey P. Dale, Apr 16 2013
STATUS
approved
