|
|
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
|
|
|
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) = {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)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|