cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A086042 #14 Jun 08 2025 16:15:42
%S A086042 31,71,73,97,101,103,107,109,131,173,193,197,271,293,307,311,317,373,
%T A086042 397,419,439,491,509,547,571,593,607,617,647,659,673,701,709,719,727,
%U A086042 733,739,743,751,757,761,809,839,907,919,937,941,947,953,971,983,991
%N A086042 Nontrivial numbers which are prime and yield another prime when their digits are sorted in ascending order.
%C A086042 Primes with digits already in ascending order (like 13 and 2357) are trivial cases and are therefore excluded.
%C A086042 See A211654 for the sequence including the trivial cases. - _M. F. Hasler_, Jul 30 2019
%H A086042 Harvey P. Dale, <a href="/A086042/b086042.txt">Table of n, a(n) for n = 1..1000</a>
%e A086042 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 A086042 paoQ[n_]:=Module[{idn=IntegerDigits[n],sidn},sidn=Sort[idn];sidn!=idn && PrimeQ[FromDigits[sidn]]] (* _Harvey P. Dale_, Nov 14 2011 *)
%o A086042 (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 A086042 (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 A086042 Cf. A086402, A086051, A211654.
%K A086042 base,nonn
%O A086042 1,1
%A A086042 _Chuck Seggelin_, Jul 07 2003