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!)
A071362 Smallest n-digit prime with strictly increasing digits. 7
2, 13, 127, 1237, 12347, 123457, 1234789, 12356789 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
PROG
(PARI) A071362(n, u=vectorv(n, i, 10^(n-i)))=forvec(d=vector(n, i, [1, 9]), isprime(d*u)&&return(d*u), 2) \\ M. F. Hasler, May 04 2017
(Python)
from sympy import nextprime
def inc(n):
s = str(n); return len(s)==1 or all(d>pd for pd, d in zip(s[:-1], s[1:]))
def a(n):
p = nextprime(10**(n-1))
while not inc(p): p = nextprime(p)
return p
for n in range(1, 9):
print(a(n), end=", ") # Michael S. Branicky, Feb 13 2021
CROSSREFS
Sequence in context: A328008 A073559 A074365 * A108471 A036078 A290219
KEYWORD
base,fini,full,nonn
AUTHOR
Rick L. Shepherd, May 21 2002
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 23 16:40 EDT 2024. Contains 371916 sequences. (Running on oeis4.)