login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A163556 Composite numbers such that exactly four distinct permutations of decimal digits are prime. 3
170, 194, 710, 790, 791, 793, 914, 917, 970, 973, 1003, 1012, 1015, 1016, 1024, 1028, 1030, 1042, 1082, 1090, 1102, 1105, 1106, 1120, 1126, 1135, 1138, 1150, 1157, 1159, 1160, 1162, 1175, 1178, 1183, 1195, 1204, 1208, 1210, 1216, 1234, 1240, 1243, 1258 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
a(1) = 170 because 170 is composite, the four permutations 17, 71, 107, and 701 are all prime, and no other permutation of 170 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 >= 5 then return false fi;
fi
od;
evalb(c=4)
end proc:
select(filter, [$10..2000]); # Robert Israel, Aug 10 2020
MATHEMATICA
Select[Range[1300], CompositeQ[#]&&Count[FromDigits/@Permutations[ IntegerDigits[ #]], _?PrimeQ]==4&] (* Harvey P. Dale, Oct 26 2015 *)
CROSSREFS
Sequence in context: A043658 A296892 A045002 * A229467 A218071 A113789
KEYWORD
easy,nonn,base
AUTHOR
Gil Broussard, Jul 30 2009
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 18:04 EDT 2024. Contains 371254 sequences. (Running on oeis4.)