Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#51 2016-11-20 21:54:07

zetafunc
Moderator
Registered: 2014-05-21
Posts: 2,436
Website

Re: A zeta-like sum

OK, no worries. But if the results so far suggest that we have divergence for r = 3, d = 1, then it also implies divergence for all r and all d >= 2. In which case, we need to use the better bound, i.e. the one involving Bessel functions, or at least the asymptotics of those Bessel functions. What we have seen so far suggests that we lose too much information when trying to bound the Bessel functions -- in other words, we would need to make use of the positive-negative cancellation if we want any semblance of convergence for the sum (or the integral).

I tried the code with n = 100 and that outputs {1.25183, 13.6862} in a few seconds. n = 400 returns {15.3759, 14.1979}. What is that first number supposed to be in each case?

EDIT: n = 963 is working fine, but n = 964 or higher does not produce any output, even if I give Mathematica's memory the highest priority in Task Manager.

Last edited by zetafunc (2016-11-21 06:52:53)

Offline

#52 2016-11-21 07:52:12

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: A zeta-like sum

The first number is the time for the computation.

if I give Mathematica's memory the highest priority in Task Manager.

That will not matter. You are probably using all the available RAM up and Windoze is not smart enough to go to the hard drive.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#53 2016-11-21 08:24:22

zetafunc
Moderator
Registered: 2014-05-21
Posts: 2,436
Website

Re: A zeta-like sum

So unless I get Linux I am stuck?

Offline

#54 2016-11-21 08:31:47

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: A zeta-like sum

How much memory does that machine have?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#55 2016-11-21 08:58:29

zetafunc
Moderator
Registered: 2014-05-21
Posts: 2,436
Website

Re: A zeta-like sum

4 GB maximum.

Offline

#56 2016-11-21 09:00:54

zetafunc
Moderator
Registered: 2014-05-21
Posts: 2,436
Website

Re: A zeta-like sum

Someone suggested an alternative code on Mathematica SE which is getting me a result for n = 1000 in 52 seconds.

n = 1000;
Times @@@ (1/Abs[Append[ #, -Plus @@ #]] & /@ 
  Select[ Tuples[Cases[Range[-n, n], Except[0]], {2}] , 
   1 <= Abs[Plus @@ #] <= n  & ]) // Total // N // AbsoluteTiming

n = 1200 returned 14.338.

Last edited by zetafunc (2016-11-21 10:17:58)

Offline

#57 2016-11-21 09:43:19

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: A zeta-like sum

Hi;

His answer is just a temporary fix. I can maybe do better than his.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#58 2016-11-21 10:21:00

zetafunc
Moderator
Registered: 2014-05-21
Posts: 2,436
Website

Re: A zeta-like sum

He gave this version which he says is not memory-limited because it does not construct full tuple lists.

n = 2000;
Monitor[Times @@@ 
     Reap[Do[ 
        tup = {Floor[(i - 1)/(2 n + 1)] - n, 
          Mod[(i - 1), (2 n + 1)] - n};
        If[Times @@ tup != 0 && 1 <= Abs[Plus @@ tup] <= n, 
         Sow[1/Abs[Append[tup, -Plus @@ tup]]]],
        {i, (2 n + 1)^2 }]][[2, 1]] // Total // N // 
  AbsoluteTiming, {N[i/(2 n + 1)^2]}]

n = 1400 returns 14.3491. n = 1600 returns 14.3575. n = 1700 returns 14.3611.

I am running it for n = 2000 but it looks like it will take a while. Unfortunately after running it I got this error:

The current computation was aborted because there was insufficient memory available to complete the computation.

Last edited by zetafunc (2016-11-21 11:38:37)

Offline

#59 2016-11-21 10:39:54

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: A zeta-like sum

I have upvoted his solution. How much memory do you have on your machine?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#60 2016-11-21 10:45:11

zetafunc
Moderator
Registered: 2014-05-21
Posts: 2,436
Website

Re: A zeta-like sum

I have 4 GB. But this does not seem to be enough.

Last edited by zetafunc (2016-11-21 10:52:08)

Offline

#61 2016-11-21 10:55:49

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: A zeta-like sum

Maybe not, I have 8 GB which is small. He probably has more than I do.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#62 2016-11-21 11:43:04

zetafunc
Moderator
Registered: 2014-05-21
Posts: 2,436
Website

Re: A zeta-like sum

Can't get a result for n = 1750. I don't get it, there is plenty of memory available. The Kernel barely exceeded 1 GB, and just before it finishes it crashes.

Offline

#63 2016-11-21 11:56:07

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: A zeta-like sum

Hi;

Just because there is memory left does not mean that Windows is going to allocate it to Mathematica. There are other processes running that need RAM too. Also, Windows itself might be using it. And of course it could be a bug in 10.3

I just posted this on the SE. It is at this moment the fastest. Do not forget to upvote over there and accept an answer after about 24 hours have passed. You should not pick mine unless you feel it is the best answer.

n = 2000;
AbsoluteTiming[
Sum[Sum[Abs[1/a] Abs[1/b] Abs[1/(b + a)],
    {b, Select[
      Range[Piecewise[{{-n, a > 0}, {-(n + a), a < 0}}],
       Piecewise[{{n, a < 0}, {n - a, a > 0}}]], # !=
         0 && # != -a & ]}] // N,
  {a, Select[Range[-n, n], # != 0 & ]}]]

{162.751, 14.3696}


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#64 2016-11-21 14:45:25

phrontister
Real Member
From: The Land of Tomorrow
Registered: 2009-07-12
Posts: 4,877

Re: A zeta-like sum

Hi;

Here are the results from my PC, running on 64-bit Windows 10 Home with 24GB RAM, and M version 10.2.0.0.

Bobby's:
n=2000: {49.917894397904675, 14.369627144092833}

zetafunc's:
n=2000: {154.0926965884645, 14.369627144092856}
n=1750: {117.00484180506999, 14.362679551713114}

All without Monitor. With Monitor added 3% or so to the time.

Last edited by phrontister (2016-11-21 15:13:26)


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

#65 2016-11-21 15:06:51

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: A zeta-like sum

24 GB of RAM! I have 8.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#66 2016-11-21 15:27:20

phrontister
Real Member
From: The Land of Tomorrow
Registered: 2009-07-12
Posts: 4,877

Re: A zeta-like sum

I just rebooted my PC to try and get under 50 seconds. Success! smile I've updated my post.

24 GB of RAM! I have 8.

Same thing: my Sharp PC-1500A had 8KB RAM, which I increased via a 16KB module to 24KB. Now it can do so much more!

Last edited by phrontister (2016-11-21 15:38:30)


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

#67 2016-11-21 16:47:14

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: A zeta-like sum

Same thing: my Sharp PC-1500A had 8KB RAM, which I increased via a 16KB module to 24KB. Now it can do so much more!

The first sharp I bought had 256 bytes of memory. It could store only 4 programs and no program could be bigger than 160 bytes. A young fellow like yourself would not remember that.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#68 2016-11-21 20:39:39

zetafunc
Moderator
Registered: 2014-05-21
Posts: 2,436
Website

Re: A zeta-like sum

Thanks, that code is definitely faster, and it also outputs a result without crashing. I got 14.4005 for n = 5000 in about 1000 seconds. But still no sign of convergence, sadly. Trying n = 10000 at the moment.

Offline

#69 2016-11-22 03:18:23

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: A zeta-like sum

Yes, so far we have not even established the first decimal place and frankly this sum is behaving like something that increases very slowly but still diverges. Lord knows, there are tons of those out there.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#70 2016-11-22 04:09:02

zetafunc
Moderator
Registered: 2014-05-21
Posts: 2,436
Website

Re: A zeta-like sum

Well, the good thing is that this means we have to go back to Bessel functions which should show more encouraging signs.

Offline

#71 2016-11-22 04:53:53

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: A zeta-like sum

Hi;

Did the 10000 finish?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#72 2016-11-22 05:01:15

zetafunc
Moderator
Registered: 2014-05-21
Posts: 2,436
Website

Re: A zeta-like sum

Yes, I got:

{4921.03, 14.4117}

after 4921.26 seconds. Signs point to divergence or an incredibly slowly converging sum.

Last edited by zetafunc (2016-11-22 05:02:08)

Offline

#73 2016-11-22 05:33:34

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: A zeta-like sum

I agree, you mentioned another approach?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#74 2016-11-22 06:35:19

zetafunc
Moderator
Registered: 2014-05-21
Posts: 2,436
Website

Re: A zeta-like sum

The other approach is this: we try to estimate this sum and plug in various values of rho to see how it behaves with those different values, so that we can try to guess the relationship that holds.

But I haven't really been able to get Mathematica to give me anything for this. Essentially I would like to investigate how this sum changes by plugging in different values of
, preferably large
There is also a version replacing the integrals with a pair of sums (but the point was that we bounded the sums by integrals because they might be easier to compute).

Last edited by zetafunc (2016-11-22 06:37:03)

Offline

#75 2016-11-22 07:15:49

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: A zeta-like sum

Hi;

How can that be represented in M?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

Board footer

Powered by FluxBB