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!)
A114429 Larger of the greatest twin prime pair with n digits. 4
7, 73, 883, 9931, 99991, 999961, 9999973, 99999589, 999999193, 9999999703, 99999999763, 999999999961, 9999999998491, 99999999999973, 999999999997969, 9999999999999643, 99999999999998809, 999999999999998929 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Also the denominator of the largest prime over prime fraction less than 10^n.
LINKS
FORMULA
a(n) = A092250(n) + 2. - M. F. Hasler, Jan 17 2022
PROG
(Python)
import sympy
for i in range(1, 100):
p=sympy.prevprime(10**i)
while not sympy.isprime(p-2):
p=sympy.prevprime(p)
print(p)
# Abhiram R Devesh, Aug 02 2014
(PARI)
a(n)=my(p=precprime(10^n)); while(!ispseudoprime(p-2), p=precprime(p-1)); return(p)
vector(50, n, a(n)) \\ Derek Orr, Aug 02 2014
(PARI) apply( {A114429(n, p=10^n)=until(2==p-p=precprime(p-1), ); p+2}, [1..22]) \\ twice as fast by avoiding additional ispseudoprime(). - M. F. Hasler, Jan 17 2022
(Python)
from sympy import prevprime
def a(n):
p = prevprime(10**n); pp = prevprime(p)
while p - pp != 2: p, pp = pp, prevprime(pp)
return p
print([a(n) for n in range(1, 19)]) # Michael S. Branicky, Jan 17 2022
CROSSREFS
Cf. A092250 (a(n)-2: lesser of the pair).
Sequence in context: A357165 A357226 A106651 * A365846 A365668 A124547
KEYWORD
base,easy,nonn
AUTHOR
Cino Hilliard, Feb 13 2006
EXTENSIONS
Corrected by T. D. Noe, Nov 15 2006
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 03:08 EDT 2024. Contains 371918 sequences. (Running on oeis4.)