login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A275712
Decimal expansion of the sum of the alternating series of reciprocals of nonprime numbers.
7
8, 4, 8, 1, 3, 2, 2, 1, 1, 8, 7, 6, 9, 8
OFFSET
0,1
COMMENTS
From Jon E. Schoenfield, Nov 10 2016: (Start)
Let S(j) be the partial sum through the j-th term of the alternating series, i.e., S(j) = -Sum_{m=1..j} (-1)^m/A018252(m). The sequence of real values S(2*i-1) for i >= 1, i.e., of partial sums 1/1, 1/1 - 1/4 + 1/6, 1/1 - 1/4 + 1/6 - 1/8 + 1/9, ... (each of which ends with a positive term) will approach the limit from above, while the sequence of real values S(2*i) for i >= 1, i.e., of partial sums 1/1 - 1/4, 1/1 - 1/4 + 1/6 - 1/8, 1/1 - 1/4 + 1/6 - 1/8 + 1/9 - 1/10, ... (each of which ends with a negative term) will approach the limit from below. Let S'(j) = (S(j-1) + S(j))/2; equivalently, S'(j) = -(Sum_{m=1..j-1} (-1)^m/A018252(m) + (1/2)*(-1)^j/A018252(j)), so S'(j) can be viewed as an adjusted version of S(j), adjusted by using only half of the final term of S(j). At large values of j, successive values of S'(j) will fluctuate very little compared to the differences between successive values of S(j), because the averaging of successive values of S(j), which are above the limit at each odd value of j and below the limit by very nearly the same amount at each even value of j, causes the values of S'(j) to trace a path midway between that traced by the S(j) values for odd j and those for even j.
Moreover, it can be observed (see the charts under Links) that the values of S'(j) themselves fall into three sharply distinct real-valued subsequences: one that converges toward the limit from above and consists of those values where both j and the j-th nonprime number (i.e., the reciprocal of the last term in S(j)) are even; one that converges toward the limit from below and consists of those values where j is odd and the j-th nonprime number is even; and one that stays very near the middle, converging even more rapidly toward the limit, and consisting of all those values where the j-th nonprime number is odd (regardless of the parity of j). The values in this last subsequence converge so rapidly that the first 1000 or so terms are sufficient to show that the limit is clearly 0.848132..., with the next digit very likely another 2. Using the first 10^7 terms, it becomes apparent ("zoomed in" more closely than in the 3-curve chart under Links) that the limit is 0.8481322118769887..., and having observed the behavior of this last subsequence out to nearly j=3*10^9, I am confident that the limit is 0.84813221187698878102544...
But how many of these digits can be rigorously proved? (End)
From Robert Price, Nov 13 2016: (Start)
To support the comments above by Jon Schoenfield: The sum of an alternating arithmetic sequence whose terms are decreasing in absolute value will always converge. The method he has outlined, we might call the "Schoenfield Interpolation". To illustrate further and to confirm his method, the simpler sum: log(2) = 1/1 - 1/2 + 1/3 - 1/4 + ... can be calculated with the following Mathematica program. Note that after only 20,000 iterations, needing only a few seconds, the limit can be obtained to 13 digits.
sum = 0;
iter = 20000;
For[i=1,i<=iter,i=i+2,
sum = sum + 1/i;
upper = sum;
If[i>iter-10,avg1=(upper+lower)/2;Print[N[{upper,lower,avg1,(avg1+avg2)/2},15]]];
sum = sum - 1/(i+1);
lower = sum;
If[i>iter-10,avg2=(upper+lower)/2;Print[N[{upper,lower,avg2,(avg1+avg2)/2},15]]];
];
N[Log[2],15]
{0.693172191189447,0.693122168679318,0.693147179934382,0.693147181497164}
{0.693172191189447,0.693122171181444,0.693147181185446,0.693147180559914}
{0.693172188687571,0.693122171181444,0.693147179934508,0.693147180559977}
{0.693172188687571,0.693122173683070,0.693147181185320,0.693147180559914}
{0.693172186186196,0.693122173683070,0.693147179934633,0.693147180559977}
{0.693172186186196,0.693122176184195,0.693147181185195,0.693147180559914}
{0.693172183685320,0.693122176184195,0.693147179934758,0.693147180559977}
{0.693172183685320,0.693122178684820,0.693147181185070,0.693147180559914}
{0.693172181184945,0.693122178684820,0.693147179934883,0.693147180559977}
{0.693172181184945,0.693122181184945,0.693147181184945,0.693147180559914}
0.693147180559945
(End)
FORMULA
-Sum_{k>=1} (-1)^k/A018252(k) = 1/1 - 1/4 + 1/6 - 1/8 + 1/9 - 1/10 + 1/12 - ...
Equals 1 - A269229.
EXAMPLE
0.84813221187698...
MATHEMATICA
NonPrime[n_] := FixedPoint[n + PrimePi@# &, n + PrimePi@n]; N[Sum[(-1)^n/NonPrime[n], {n, 1, 200}], 25] (* G. C. Greubel, Aug 06 2016 *)
PROG
(Sage)
nonprime = (i for i in NN if i>0 and not i.is_prime())
s = RLF(0); s
RealField(110)(s)
for i in range(0, 50000): s += (-1)^i / next(nonprime)
print(s) # Terry D. Grant, Aug 06 2016
CROSSREFS
KEYWORD
nonn,cons,more
AUTHOR
Terry D. Grant, Aug 06 2016
EXTENSIONS
Incorrect terms a(7)-a(10) deleted, and corrected terms a(7)-a(9) added, by Robert Price, Nov 09 2016
a(10)-a(13) from Robert Price, Nov 13 2016
STATUS
approved