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!)
A052015 Primes with distinct digits in ascending order. 11
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
T. D. Noe, Table of n, a(n) for n = 1..100 (complete sequence)
EXAMPLE
Last term is a(100) = 23456789.
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 *)
PROG
(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
CROSSREFS
Sequence in context: A042991 A162338 A339342 * A042992 A344621 A255203
KEYWORD
nonn,base,fini,full
AUTHOR
Patrick De Geest, Nov 15 1999
STATUS
approved

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 19 12:14 EDT 2024. Contains 371792 sequences. (Running on oeis4.)