|
|
A120533
|
|
Primes having a prime number of digits.
|
|
3
|
|
|
11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Before the 20th century, this sequence would have contained the numbers 1,2,3,5,7; see A008578.
There are a total of 8527 terms for primes with 2, 3, or 5 digits, and a total of 594608 terms if primes with 7 digits are also included. - Harvey P. Dale, Nov 02 2020
|
|
LINKS
|
|
|
EXAMPLE
|
10007 is a 5-digit prime and so belongs to the sequence.
|
|
MATHEMATICA
|
Table[Prime[Range[PrimePi[10^(p-1)]+1, PrimePi[10^p]]], {p, Prime[Range[ 3]]}]//Flatten (* Harvey P. Dale, Nov 02 2020 *)
|
|
PROG
|
(PARI) g(n) = forprime(x=11, n, if(isprime(length(Str(x))), print1(x", ")))
(Python)
from itertools import islice
from sympy import isprime, nextprime
def agen(): # generator of terms
d = 2
while True:
yield from (i for i in range(10**(d-1)+1, 10**d, 2) if isprime(i))
d = nextprime(d)
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|