A240170 Larger of the greatest cousin prime pair with n digits.
7, 83, 971, 9887, 99881, 999983, 9999401, 99999551, 999999761, 9999999707, 99999999947, 999999998867, 9999999999083, 99999999999467, 999999999997841, 9999999999997031, 99999999999998717, 999999999999999161, 9999999999999996587, 99999999999999999803
Offset: 1
Links
- Abhiram R Devesh, Table of n, a(n) for n = 1..100
- Eric Weisstein's World of Mathematics, Cousin Primes
Crossrefs
Programs
-
PARI
a(n)=p=precprime(10^n);while(!isprime(p-4),p=precprime(p-1));return(p) vector(50, n, a(n)) \\ Derek Orr, Aug 04 2014
-
Python
import sympy for i in range(1,100): a=(10**i) p=sympy.prevprime(a) while sympy.isprime(p-4)==False: p=sympy.prevprime(p) print(p)
Comments