OFFSET
1,41
COMMENTS
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).
LINKS
Andres Cicuttin, Table of n, a(n) for n = 1..15000
FORMULA
a(n) = floor(Sum_{i=1..n} ((-1)^(i - 1))/(prime(i+1)-prime(i))).
a(n) = floor(Sum_{i=1..n} ((-1)^(i - 1))/A001223(i)).
EXAMPLE
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
MATHEMATICA
Table[Floor@Sum[((-1)^(j - 1))/(Prime[j + 1] - Prime[j]), {j, 1, n}], {n, 1, 100}];
PROG
(PARI) a(n) = floor(sum(i=1, n, ((-1)^(i-1))/(prime(i+1)-prime(i)))) \\ Felix Fröhlich, Jul 07 2016
CROSSREFS
KEYWORD
sign
AUTHOR
Andres Cicuttin, Jul 07 2016
STATUS
approved