login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A227509 a(n) = difference between the 2 smallest prime numbers > 10^n. 1
2, 2, 4, 2, 16, 30, 60, 30, 2, 14, 16, 22, 14, 36, 54, 8, 10, 6, 36, 90, 76, 48, 40, 42, 210, 56, 176, 126, 60, 42, 24, 204, 188, 36, 34, 56, 20, 38, 34, 18, 170, 106, 22, 26, 112, 416, 160, 24, 60, 296, 126, 64, 30, 126, 136, 6, 84, 10, 174, 60, 286, 126, 186, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

(Sum_{n=1..N} a(n)/n)/N appears to tend to log(10) as N increases.

LINKS

Pierre CAMI, Table of n, a(n) for n = 1..1825

EXAMPLE

10^1+1=11 is prime as is 13 so a(1)=2.

10^2+1=101 is prime as is 103 so a(2)=2.

MATHEMATICA

spn[n_]:=Module[{a=NextPrime[10^n]}, NextPrime[a]-a]; Array[spn, 70] (* Harvey P. Dale, Sep 01 2017 *)

PROG

PFGW & SCRIPT

SCRIPT

DIM n, 0

DIM k

DIM g

DIMS t

OPENFILEOUT myfile, a(n).txt

LABEL a

SET n, n+1

SET k, -1

LABEL b

SET k, k+2

SETS t, %d, %d\,; n; k

PRP 10^n+k, t

IF ISPRP THEN GOTO c

GOTO b

LABEL c

SET g, k

LABEL d

SET k, k+2

SETS t, %d, %d\,; n; k

PRP 10^n+k, t

IF ISPRP THEN GOTO e

GOTO d

LABEL e

SET g, k-g

SETS t, %d, %d, %d\,; n; g; k

WRITE myfile, t

GOTO a

CROSSREFS

Sequence in context: A159749 A227293 A102416 * A279094 A299148 A129243

Adjacent sequences:  A227506 A227507 A227508 * A227510 A227511 A227512

KEYWORD

nonn

AUTHOR

Pierre CAMI, Jul 14 2013

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 December 10 14:27 EST 2019. Contains 329896 sequences. (Running on oeis4.)