OFFSET
1,1
COMMENTS
Sum of reciprocals = 0.215331408...
Also the numerator of the largest prime-over-prime fraction less than 1 that is the ratio of two primes both less than 10^n. - Cino Hilliard, Feb 13 2006 [edited by Jon E. Schoenfield, Dec 01 2019]
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..1000
Robert G. Wilson v, Table of n, a(n) for n = 1..1250 (includes terms with more than 1000 digits)
MATHEMATICA
Array[Block[{k = 10^# - 3}, While[! AllTrue[{k, k + 2}, PrimeQ], k -= 2]; k] &, 18]
PROG
(PARI) lasttwpr(n) = { sr=0; for(m=0, n, c=0; forstep(x=10^(m+1)-1, 10^m, -2, if(isprime(x)&& isprime(x-2), print1(x-2", "); sr+=1./(x-2); break) ) ); print(); print(sr) }
(PARI) apply( {A092250(n, p=10^n)=until(2==p-p=precprime(p-1), ); p}, [1..22]) \\ avoids multiple isprime(): much faster! - 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 pp
print([a(n) for n in range(1, 19)]) # Michael S. Branicky, Jan 17 2022
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Cino Hilliard, Feb 17 2004
STATUS
approved