The Student Room Group

Work out value of infinite series (harmonic adjusted)

I was thinking about harmonic series and wanted to adjust the notion to explore them.

I came up with the infinite sum

(1) - (1/2+1/3) + (1/4+1/5+1/6) - (1/7+1/8+1/9+1/10) + (1/11+1/12+1/13+1/14+1/15)+...

This sum converges because if you simplify each group of sums in the brackets then it becomes an alternating series where the magnitude of each term strictly decreases to 0.

My question is, does this infinite sum have a value that can be expressed neatly in terms of any log, pi, or other standard function?
(edited 4 years ago)
Original post by takeonme79
I was thinking about harmonic series and wanted to adjust the notion to explore them.

I came up with the infinite sum

(1) - (1/2+1/3) + (1/4+1/5+1/6) - (1/7+1/8+1/9+1/10) + (1/11+1/12+1/13+1/14+1/15)+...

This sum converges because if you simplify each group of sums in the brackets then it becomes an alternating series where the magnitude of each term strictly decreases to 0.

My question is, does this infinite sum have a value that can be expressed neatly in terms of any log, pi, or other standard function?


Do you have any idea yourself or is it just something you'd like to know? As it's not the easiest series to write out explicitly.
Reply 2
Original post by zetamcfc
Do you have any idea yourself or is it just something you'd like to know? As it's not the easiest series to write out explicitly.

It's something I've come up with myself but have no idea how to calculate this. Just wondering if there's any research done into anything along these lines or anything you might be able to point me to to help solve this. I might have a better chance of solving the same series but with squares on the denominator, maybe I should investigate that first.
Original post by takeonme79
It's something I've come up with myself but have no idea how to calculate this. Just wondering if there's any research done into anything along these lines or anything you might be able to point me to to help solve this. I might have a better chance of solving the same series but with squares on the denominator, maybe I should investigate that first.

I'm not entirely sure, anyone who has Wolfram Pro could input ''sum n=1 to infinity (polygamma(0, 1/2 (n^2 + n + 2)) - polygamma(0, 1/2 (n^2 - n + 2)))*((-1)^(n-1)) '' and it might give you a result but I'm not sure it gives a closed form solution.
Original post by takeonme79
...


Just running it through Excel (OK, not the best software for this sort of calculation), convergence is incredibly slow; even after ~10,000 terms the partial sums are oscillating between 0.5099 and 0.5243.
(edited 4 years ago)
Reply 5
Original post by ghostwalker
Just running it through Excel (OK, not the best software for this sort of calculation), convergence is incredibly slow; even after ~10,000 terms the partial sums are oscillating between 0.5099 and 0.5243.

I love doing stuff in Excel. How did you get it to do the differing number of + and - signs in each successive bracket? I doubt that this sum of going to converge to anything neatly expressible. I tried some tricks like halving the terms and adding them to the alternating harmonic series to try to cancel some terms out but it didn't work.
I agree with @ghostwalker regarding slow convergence... In fact the word 'slow' doesnt even do justice to this snail of a series !

I have written MATLAB code on my phone for approximating this value and have attached images of my code above which approxomated the sum to 3 dp at 0.157 but at a cost of WHOLE LOT of terms. Indeed, i had run the code over and over under different n (number of terms in the series) and obtained approximation s of the sum. You can see how n blows up very quickly for very little gain. (Hopefully it shows up in the posts above, otherwise i will attach it tomorrow)

And as far as the sign changing goes, I exploited the fact that we change sign on the 2nd term, then the 4th term, then the 7th, etc... which are presicely 1 more than a triangular number. So in my code 'flag' denotes the sign and it changes in this respect.
(edited 4 years ago)
Original post by RDKGames
I agree with @ghostwalker regarding slow convergence... In fact the word 'slow' doesnt even do justice to this snail of a series !

I have written MATLAB code on my phone for approximating this value and have attached images of my code above which approxomated the sum to 3 dp at 0.157 but at a cost of WHOLE LOT of terms. Indeed, i had run the code over and over under different n (number of terms in the series) and obtained approximation s of the sum. You can see how n blows up very quickly for very little gain. (Hopefully it shows up in the posts above, otherwise i will attach it tomorrow)

And as far as the sign changing goes, I exploited the fact that we change sign on the 2nd term, then the 4th term, then the 7th, etc... which are presicely 1 more than a triangular number. So in my code 'flag' denotes the sign and it changes in this respect.


Nice coding for the sign flip - PRSOM.

For n = 10,000, although the partial sums are oscillating between 0.5099... and 0.5243... taking the average of two consecutive points where the sign flips gives 0.51712589 (the approach to the limit is almost symmetrical above and below). With your considerably higher values of n, I think you'll have several more than 3 dec.pl.

Edit: Although at n=1.0e+10, rounding errors may be an issue? Best I can tell, matlab and excel both work to only 15 dec.pl.

@takeonme79

My working out for the sign was very inefficient:

=(-1)^(1+CEILING(-0.5+SQRT(1/4+2*ROW()),1))

I used the fact that the nth triangular number is given by:

Tn=n(n+1)2\displaystyle T_n=\frac{n(n+1)}{2}

Rearrange the quadratic to solve for n in terms of TnT_n, which is my row().

Then small adjustments; ceiling and +1 to get it right.
(edited 4 years ago)
Original post by takeonme79
...


OK, reworked my spreadsheet and moved most of the processing to a macro. Now working out the partial sums for each signed block, and can go a lot further - though not as far as RDKGames has gone.

As you can see we seem to be converging on 0.5171003 with next digit probably an 8 - see end of post.

Untitled2.jpg

Edit: Just pushed it to 15000 blocks (112 507 500 terms) and convergence looks to be between 0.5171003768 and 0.5171003813.
(edited 4 years ago)
Original post by ghostwalker
OK, reworked my spreadsheet and moved most of the processing to a macro. Now working out the partial sums for each signed block, and can go a lot further - though not as far as RDKGames has gone.

As you can see we seem to be converging on 0.5171003 with next digit probably an 8 - see end of post.

Edit: Just pushed it to 15000 blocks (112 507 500 terms) and convergence looks to be between 0.5171003768 and 0.5171003813.


Leave it running through the night and see what it churns out :holmes:
Original post by RDKGames
Leave it running through the night and see what it churns out :holmes:


Unfortunately it's not written in a manner that lends itself to that.

Pushed it as far as it's reasonable to go for now:

40,000 sign-blocks. 800 020 000 terms. And range down to (0.5171003787,0.5171003794)

And that took several minutes, albeit restricting Excel to 1 CPU.

I've gone well past the limit where it's safe as far as rounding errors are concerned (~10^9 terms and 9 decimal places = OTT). Needs arbitrary precision arithmetic, which is beyond Excel's capabilities.

There are addons that allow arbitrary precision, but it would mean pulling the code out of the macro and just using their new functions on the spreadsheet. Can't see a way to do that at present without it blowing the limits for a spreadsheet many times over.

Need a different environment.
(edited 4 years ago)
Reply 12
Could either of you adjust your calculation to find the sum with squares on the denominator please? It should converge much faster.
Original post by takeonme79
Could either of you adjust your calculation to find the sum with squares on the denominator please? It should converge much faster.


Yes, it does, 0.7303487079, with a possible error of 1 in the last place. Takes about 20,000,000 terms.
Reply 14
Original post by ghostwalker
Yes, it does, 0.7303487079, with a possible error of 1 in the last place. Takes about 20,000,000 terms.

Pi squared multiplied by 37/500 gives 0.730350725681 which is close but not close enough.

Quick Reply

Latest