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.

A052015 Primes with distinct digits in ascending order.

Original entry on oeis.org

2, 3, 5, 7, 13, 17, 19, 23, 29, 37, 47, 59, 67, 79, 89, 127, 137, 139, 149, 157, 167, 179, 239, 257, 269, 347, 349, 359, 367, 379, 389, 457, 467, 479, 569, 1237, 1249, 1259, 1279, 1289, 1367, 1459, 1489, 1567, 1579, 1789, 2347, 2357, 2389, 2459, 2467, 2579
Offset: 1

Views

Author

Patrick De Geest, Nov 15 1999

Keywords

Examples

			Last term is a(100) = 23456789.
		

Crossrefs

Programs

  • Maple
    b:= proc(n) `if`(isprime(n), n, [][]), seq(
          b(parse(cat(n, j))), j=irem(n, 10)+1..9)
        end:
    sort([seq(b(n), n=1..9)])[];  # Alois P. Heinz, Jun 16 2025
  • Mathematica
    t={};Do[p=Prime[n];If[Select[Differences[IntegerDigits[p]],#<=0&]=={},AppendTo[t,p]],{n,380}];t (* Jayanta Basu, May 04 2013 *)
    Select[Prime[Range[5000]],Min[Differences[IntegerDigits[#]]]>0&] (* Harvey P. Dale, Jun 20 2015 *)
    Select[FromDigits@# &/@Subsets@Range@9,PrimeQ] (* Hans Rudolf Widmer, Apr 08 2023 *)
  • PARI
    A052015=vecextract( vecsort( vector( 511,i,isprime( t=eval( concat( vecextract(Vec("123456789"),i ))))*t),NULL,8),"^1") /* for old PARI versions replace,NULL,8),"^1" by ),"-100.." */ \\ M. F. Hasler, Jan 27 2009
    
  • Python
    from sympy import isprime
    from itertools import combinations
    def agen(): # generator of terms
        for d in range(1, 9):
            for c in combinations("123456789", d):
                if isprime(t:=int("".join(c))):
                    yield t
    print(list(agen())) # Michael S. Branicky, Dec 13 2023