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.

A086402 Nontrivial numbers which are prime and yield another prime when their digits are sorted in descending order.

Original entry on oeis.org

13, 17, 37, 79, 113, 131, 149, 157, 163, 167, 179, 181, 191, 197, 199, 241, 251, 281, 313, 337, 347, 359, 373, 389, 419, 461, 463, 491, 563, 571, 593, 613, 617, 683, 719, 787, 797, 839, 919, 1163, 1181, 1193, 1217, 1223, 1229, 1237, 1249, 1259, 1279, 1297
Offset: 1

Views

Author

Chuck Seggelin, Jul 07 2003

Keywords

Comments

Primes with digits already in descending order (like 311 and 3221) are trivial cases and are therefore excluded.

Examples

			a(1)=13 because a descending sort of 13's digits yields 31 which is also prime. a(100)=2411 because a descending sort of 2411's digits yields 4211 which is also prime.
		

Crossrefs

Cf. A003459.

Programs

  • Mathematica
    pdsdQ[p_]:=With[{d=FromDigits[ReverseSort[IntegerDigits[p]]]},d!=p&&PrimeQ[d]]; Select[Prime[Range[250]],pdsdQ] (* Harvey P. Dale, Oct 03 2024 *)