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

%I #26 Sep 01 2017 17:43:52

%S 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,

%T 56,176,126,60,42,24,204,188,36,34,56,20,38,34,18,170,106,22,26,112,

%U 416,160,24,60,296,126,64,30,126,136,6,84,10,174,60,286,126,186,6

%N a(n) = difference between the 2 smallest prime numbers > 10^n.

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

%H Pierre CAMI, <a href="/A227509/b227509.txt">Table of n, a(n) for n = 1..1825</a>

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

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

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

%o PFGW & SCRIPT

%o SCRIPT

%o DIM n,0

%o DIM k

%o DIM g

%o DIMS t

%o OPENFILEOUT myfile,a(n).txt

%o LABEL a

%o SET n,n+1

%o SET k,-1

%o LABEL b

%o SET k,k+2

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

%o PRP 10^n+k,t

%o IF ISPRP THEN GOTO c

%o GOTO b

%o LABEL c

%o SET g,k

%o LABEL d

%o SET k,k+2

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

%o PRP 10^n+k,t

%o IF ISPRP THEN GOTO e

%o GOTO d

%o LABEL e

%o SET g,k-g

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

%o WRITE myfile,t

%o GOTO a

%K nonn

%O 1,1

%A _Pierre CAMI_, Jul 14 2013

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 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)