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!)
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
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: A359442 A102416 A333595 * A279094 A299148 A129243
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)