login
A163559
Composite numbers such that exactly seven distinct permutations of digits give primes.
4
1037, 1073, 1190, 1247, 1274, 1345, 1354, 1370, 1379, 1397, 1435, 1472, 1495, 1534, 1594, 1679, 1703, 1724, 1730, 1739, 1742, 1769, 1793, 1796, 1910, 1937, 1945, 1954, 1967, 1976, 2093, 2147, 2174, 2374, 2390, 2471, 2597, 2714, 2734, 2743, 2759, 2795
OFFSET
1,1
LINKS
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
Sequence in context: A025409 A043388 A184210 * A159052 A065572 A251876
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