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!)
A107108 Shorthand of n-th smallest n-digit prime, see comments. 2
2, 3, 7, 21, 61, 69, 117, 189, 193, 181, 259, 193, 303, 411, 487, 513, 931, 591, 861, 667, 801, 1081, 711, 1027, 1321, 1753, 1581, 2109, 1527, 1951, 2613, 2053, 2533, 3171, 2653, 3073, 2769, 2899, 3201, 3133, 4089, 2859, 4447, 5367, 3819, 4923, 5251, 5109, 5127, 6721 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
To shorthand the n-th - smallest n-digit prime it is convenient to subtract 10^(n-1) (n>1). Compare a(n) with A069100(n).
LINKS
David A. Corneth, Table of n, a(n) for n = 1..1000 (using b-file from A069100)
FORMULA
a(1)=2; at n>1 a(n)=prime(pi[10^(n-1)]+n)-10^(n-1)=A069100(n)-10^(n-1).
PROG
(PARI) a(n)=prime(primepi(10^(n-1))+n)-if(n==1, 0, 10^(n-1)) \\ Franklin T. Adams-Watters, Mar 07 2014
(PARI) a(n) = {if(n == 1, return(2)); my(t = 0); forprime(p = 10^(n-1), 10^n, t++; if(t==n, return(p - 10^(n-1))))} \\ David A. Corneth, Jun 16 2021
(Python)
from sympy import nextprime
def a(n): return nextprime(10**(n-1), ith=n) - 10**(n-1) * (n > 1)
print([a(n) for n in range(1, 51)]) # Michael S. Branicky, Jun 16 2021
CROSSREFS
Cf. A069100.
Sequence in context: A002863 A047693 A212265 * A323230 A262305 A189360
KEYWORD
nonn,base
AUTHOR
Zak Seidov, May 12 2005
EXTENSIONS
a(3) corrected by Franklin T. Adams-Watters, Mar 07 2014
More terms from David A. Corneth, Jun 16 2021
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 24 18:17 EDT 2024. Contains 371962 sequences. (Running on oeis4.)