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.

A071362 Smallest n-digit prime with strictly increasing digits.

This page as a plain text file.
%I A071362 #10 Feb 13 2021 13:56:15
%S A071362 2,13,127,1237,12347,123457,1234789,12356789
%N A071362 Smallest n-digit prime with strictly increasing digits.
%o A071362 (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
%o A071362 (Python)
%o A071362 from sympy import nextprime
%o A071362 def inc(n):
%o A071362   s = str(n); return len(s)==1 or all(d>pd for pd, d in zip(s[:-1], s[1:]))
%o A071362 def a(n):
%o A071362   p = nextprime(10**(n-1))
%o A071362   while not inc(p): p = nextprime(p)
%o A071362   return p
%o A071362 for n in range(1, 9):
%o A071362   print(a(n), end=", ") # _Michael S. Branicky_, Feb 13 2021
%Y A071362 Cf. A071363, A071360, A071361, A007809.
%K A071362 base,fini,full,nonn
%O A071362 1,1
%A A071362 _Rick L. Shepherd_, May 21 2002