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
CROSSREFS
KEYWORD
nonn
AUTHOR
Anthony C Robin, Nov 01 2007
EXTENSIONS
More terms from N. J. A. Sloane, Jan 05 2008
STATUS
approved