login
Integer part of the alternating n-th partial sum of the reciprocals of the successive prime gaps.
4

%I #27 Jul 13 2016 11:22:07

%S 1,0,1,0,1,1,1,1,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,1,0,1,1,

%T 1,1,1,1,1,1,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,

%U 2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3

%N Integer part of the alternating n-th partial sum of the reciprocals of the successive prime gaps.

%C The graph of the first 15*10^3 terms looks like a realization of a random walk. It has an estimated fractal dimension of about 1.48 (with box counting method) which is closed to that of the random walk (3/2).

%H Andres Cicuttin, <a href="/A274828/b274828.txt">Table of n, a(n) for n = 1..15000</a>

%F a(n) = floor(Sum_{i=1..n} ((-1)^(i - 1))/(prime(i+1)-prime(i))).

%F a(n) = floor(Sum_{i=1..n} ((-1)^(i - 1))/A001223(i)).

%e The prime gaps (A001223) are 1, 2, 2, 4, 2, 4, 2, .... For n=7, the 7th partial sum is 1/1 - 1/2 + 1/2 - 1/4 + 1/2 - 1/4 + 1/2 = 3/2 so a(7) is the integer part of 3/2, which is 1. - _Michael B. Porter_, Jul 11 2016

%t Table[Floor@Sum[((-1)^(j - 1))/(Prime[j + 1] - Prime[j]), {j, 1, n}], {n, 1, 100}];

%o (PARI) a(n) = floor(sum(i=1, n, ((-1)^(i-1))/(prime(i+1)-prime(i)))) \\ _Felix Fröhlich_, Jul 07 2016

%Y Cf. A001223, A217538.

%K sign

%O 1,41

%A _Andres Cicuttin_, Jul 07 2016