The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A086042 Nontrivial numbers which are prime and yield another prime when their digits are sorted in ascending order. 3

%I

%S 31,71,73,97,101,103,107,109,131,173,193,197,271,293,307,311,317,373,

%T 397,419,439,491,509,547,571,593,607,617,647,659,673,701,709,719,727,

%U 733,739,743,751,757,761,809,839,907,919,937,941,947,953,971,983,991

%N Nontrivial numbers which are prime and yield another prime when their digits are sorted in ascending order.

%C Primes with digits already in ascending order (like 13 and 2357) are trivial cases and are therefore excluded.

%C See A211654 for the sequence including the trivial cases. - _M. F. Hasler_, Jul 30 2019

%H Harvey P. Dale, <a href="/A086042/b086042.txt">Table of n, a(n) for n = 1..1000</a>

%e a(1)=31 because an ascending sort of 31's digits yields 13 which is also prime. a(53)=1009 because an ascending sort of 1009's digits yields 19 which is also prime.

%t paoQ[n_]:=Module[{idn=IntegerDigits[n],sidn},sidn=Sort[idn];sidn!=idn && PrimeQ[FromDigits[sidn]]] (* _Harvey P. Dale_, Nov 14 2011 *)

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

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

%Y Cf. A086402, A086051, A211654.

%K base,nonn

%O 1,1

%A Chuck Seggelin (barkeep(AT)plastereddragon.com), Jul 07 2003

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

Last modified August 1 14:44 EDT 2021. Contains 346393 sequences. (Running on oeis4.)