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!)
A092245 Lesser of the first twin prime pair with n digits. 4
3, 11, 101, 1019, 10007, 100151, 1000037, 10000139, 100000037, 1000000007, 10000000277, 100000000817, 1000000000061, 10000000001267, 100000000000097, 1000000000002371, 10000000000001549, 100000000000000019 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Sum of reciprocals = 0.43523579465477...
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..1000 First 101 from Abhiram R Devesh
FORMULA
a(n) = A124001(n-1) + 10^(n-1). - Robert G. Wilson v, Nov 28 2015
MAPLE
for n from 1 to 100 do
r:= 10^(n-1);
p:= nextprime(r); q:= nextprime(p);
while q - p > 2 do
p:= q; q:= nextprime(p);
od;
A[n]:= p;
od:
seq(A[n], n=1..100); # Robert Israel, Aug 04 2014
MATHEMATICA
a[n_] := Block[{p = NextPrime[10^(n -1)]}, While[ !PrimeQ[p +2], p = NextPrime@ p]; p]; Array[a, 18] (* Robert G. Wilson v, Dec 04 2022 *)
PROG
(PARI) firsttwpr(n) = { sr=0; for(m=0, n, c=0; for(x=10^m+1, 10^(m+1), if(isprime(x)&& isprime(x+2), print1(x", "); sr+=1./x; break) ) ); print(); print(sr) }
(Python)
import sympy
for i in range(100):
p=sympy.nextprime(10**i)
while not sympy.isprime(p+2):
p=sympy.nextprime(p)
print(p)
# Abhiram R Devesh, Aug 02 2014
CROSSREFS
Sequence in context: A154299 A007616 A121045 * A238446 A337734 A302927
KEYWORD
base,nonn
AUTHOR
Cino Hilliard, Feb 17 2004
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 25 05:18 EDT 2024. Contains 371964 sequences. (Running on oeis4.)