login
A163558
Composite numbers such that exactly six distinct permutations of digits give primes.
4
1036, 1096, 1099, 1136, 1235, 1238, 1253, 1267, 1276, 1294, 1306, 1316, 1325, 1328, 1352, 1358, 1360, 1378, 1382, 1385, 1387, 1492, 1532, 1538, 1603, 1630, 1631, 1672, 1678, 1687, 1690, 1726, 1738, 1762, 1768, 1786, 1832, 1835, 1837, 1853, 1876, 1906
OFFSET
1,1
LINKS
EXAMPLE
a(1) = 1036 because 1036 is composite, the six permutations 163, 613, 631, 1063, 3061, and 6301 are all prime, and no other permutation of 1036 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 >= 7 then return false fi;
fi
od;
evalb(c=6)
end proc:
select(filter, [$10..2000]); # Robert Israel, Dec 30 2025
MATHEMATICA
Select[Range[2000], CompositeQ[#]&&Count[FromDigits/@Permutations[ IntegerDigits[ #]], _?PrimeQ]==6&] (* Harvey P. Dale, Mar 05 2023 *)
CROSSREFS
Sequence in context: A023087 A219445 A373407 * A025412 A025409 A043388
KEYWORD
easy,nonn,base
AUTHOR
Gil Broussard, Jul 30 2009
STATUS
approved