A240167 Lesser of the first cousin prime pair with n digits.
3, 13, 103, 1009, 10099, 100189, 1000033, 10000453, 100000123, 1000000093, 10000000597, 100000000069, 1000000000189, 10000000000279, 100000000001173, 1000000000000399, 10000000000001719, 100000000000002733, 1000000000000002493, 10000000000000000087
Offset: 1
Links
- Abhiram R Devesh, Table of n, a(n) for n = 1..100
Programs
-
PARI
a(n)=my(p=nextprime(10^(n-1))); while(!isprime(p+4), p=nextprime(p+1)); return(p) vector(50, n, a(n)) \\ Derek Orr, Aug 04 2014
-
Python
import sympy for i in range(100): a=(10**i) p=sympy.nextprime(a) while not sympy.isprime(p+4): p=sympy.nextprime(p) print(p)
Formula
For n > 1, a(n) = 10^(n-1) + A227432(n-1), assuming a(n) exists. - Jens Kruse Andersen, Aug 22 2014
Comments