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!)
A211654 Primes that remain prime when their digits are sorted into nondecreasing order. 5

%I #24 Sep 08 2022 08:46:02

%S 2,3,5,7,11,13,17,19,23,29,31,37,47,59,67,71,73,79,89,97,101,103,107,

%T 109,113,127,131,137,139,149,157,167,173,179,193,197,199,223,227,229,

%U 233,239,257,269,271,277,293,307,311,317,337,347,349,359,367,373

%N Primes that remain prime when their digits are sorted into nondecreasing order.

%C In sequence A004185 these are referred to as "sortable primes". Nontrivial terms (with digits not in nondecreasing order) are listed in A086042. - _M. F. Hasler_, Jul 30 2019.

%H Francis J. McDonnell, <a href="/A211654/b211654.txt">Table of n, a(n) for n = 1..10000</a>

%H Francis J. McDonnell, <a href="/A211654/a211654.java.txt">Java Program</a>

%e 173 is prime and after the digits are sorted into nondecreasing order we obtain 137, which is prime.

%t Select[Prime[Range[200]], PrimeQ[FromDigits[Sort[IntegerDigits[#]]]] &] (* _T. D. Noe_, Apr 17 2012 *)

%o (PARI) select( is_A211654(p)={isprime(fromdigits(vecsort(digits(p))))&&isprime(p)}, primes([1,999])) \\ _M. F. Hasler_, Jul 30 2019

%o (Magma) [p:p in PrimesUpTo(400)| IsPrime(Seqint(Reverse(Sort(Intseq(p,10)))))]; // _Marius A. Burtea_, Jul 30 2019

%Y Cf. A028864, A028867, A211655.

%Y Cf. A086042 (nontrivial solutions), A004185 (n with digits sorted).

%K nonn,base

%O 1,1

%A _Francis J. McDonnell_, Apr 17 2012

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 20 00:03 EDT 2024. Contains 371798 sequences. (Running on oeis4.)