login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A092245 Lesser of the first twin prime pair with n digits. 3
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

Abhiram R Devesh, Table of n, a(n) for n = 1..101

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

f[n_] := Block[{p = q = NextPrime[10^(n - 1)]}, While[p + 2 != q, p = q; q = NextPrime@ q]; p]; Array[f, 18] (* Robert G. Wilson v, Nov 28 2015 *)

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):

....a=(10**i)

....p=sympy.nextprime(a)

....while sympy.isprime(p+2)==False:

........p=sympy.nextprime(p)

....print(p)

## Abhiram R Devesh, Aug 02 2014

CROSSREFS

Cf. A124001.

Sequence in context: A154299 A007616 A121045 * A238446 A337734 A302927

Adjacent sequences:  A092242 A092243 A092244 * A092246 A092247 A092248

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 26 16:30 EST 2021. Contains 340442 sequences. (Running on oeis4.)