login
A132153
Largest prime <= square root of 10^n.
7
3, 7, 31, 97, 313, 997, 3137, 9973, 31607, 99991, 316223, 999983, 3162277, 9999991, 31622743, 99999989, 316227731, 999999937, 3162277633, 9999999967, 31622776589, 99999999977, 316227766003, 999999999989, 3162277660153, 9999999999971, 31622776601657
OFFSET
1,1
COMMENTS
To check if an (n+1)-digit number is prime, u(n) is the largest prime which one needs to check is not a factor of the (n+1)-th digit number. For example, to check that a general four-digit number is not prime, we need to test its divisibility by all the primes up to and including 97.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..2000
FORMULA
a(n) = A000040(A122121(n)). a(2n) = A003618(n). - R. J. Mathar, Nov 06 2007 [Corrected by Jaroslav Krizek, Jul 12 2010]
a(n) = sqrt(A175734(n)). - Jaroslav Krizek, Aug 24 2010
PROG
(PARI) a(n)=precprime(sqrtint(10^n)) \\ Charles R Greathouse IV, Aug 18 2011
(Python)
from sympy import prevprime, integer_nthroot
def a(n): return prevprime(integer_nthroot(10**n, 2)[0]+1)
print([a(n) for n in range(1, 28)]) # Michael S. Branicky, Dec 23 2021
KEYWORD
nonn
AUTHOR
Anthony C Robin, Nov 01 2007
EXTENSIONS
More terms from N. J. A. Sloane, Jan 05 2008
STATUS
approved