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!)
A163555 Composite numbers such that exactly three distinct permutations of digits give primes. 3

%I #14 Aug 10 2020 13:18:08

%S 130,136,175,176,301,310,316,361,370,371,395,398,517,539,671,703,713,

%T 715,716,730,731,893,935,938,1004,1025,1027,1034,1040,1043,1052,1058,

%U 1072,1085,1118,1124,1142,1147,1169,1174,1189,1196,1198,1205,1207,1214

%N Composite numbers such that exactly three distinct permutations of digits give primes.

%H Robert Israel, <a href="/A163555/b163555.txt">Table of n, a(n) for n = 1..10000</a>

%e a(1) = 130 because 130 is composite and 13, 31, and 103 are prime permutations, and no other permutation of 130 is prime.

%p filter:= proc(n) local d, Permutor, P, c, i;

%p if isprime(n) then return false fi;

%p d:= ilog10(n)+1;

%p Permutor:= Iterator:-Permute(convert(n, base, 10));

%p c:= 0;

%p for P in Permutor do

%p if isprime(add(P[i]*10^(i-1), i=1..d)) then

%p c:= c+1;

%p if c >= 4 then return false fi;

%p fi

%p od;

%p evalb(c=3)

%p end proc:

%p select(filter, [$100..2000]); # _Robert Israel_, Aug 10 2020

%t With[{no=1400},Select[Complement[Range[no],Prime[Range[PrimePi[no]]]],Count[FromDigits/@Permutations[IntegerDigits[#]],_?PrimeQ]==3&]] (* _Harvey P. Dale_, Feb 25 2011 *)

%Y Cf. A163554, A163556, A163557, A163558, A163559, A163560, A163561, A163562.

%K easy,nonn,base

%O 1,1

%A _Gil Broussard_, Jul 30 2009

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 April 25 16:45 EDT 2024. Contains 371989 sequences. (Running on oeis4.)