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

You are not logged in.

- Topics: Active | Unanswered

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)*

**LearnMathsFree: Videos on various topics.New: Integration Problem | Adding FractionsPopular: Continued Fractions | Metric Spaces | Duality**

Offline

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

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

So unless I get Linux I am stuck?

**LearnMathsFree: Videos on various topics.New: Integration Problem | Adding FractionsPopular: Continued Fractions | Metric Spaces | Duality**

Offline

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

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

4 GB maximum.

**LearnMathsFree: Videos on various topics.New: Integration Problem | Adding FractionsPopular: Continued Fractions | Metric Spaces | Duality**

Offline

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)*

New: Integration Problem | Adding Fractions

Popular: Continued Fractions | Metric Spaces | Duality

Offline

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

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

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)*

New: Integration Problem | Adding Fractions

Popular: Continued Fractions | Metric Spaces | Duality

Offline

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

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

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

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

New: Integration Problem | Adding Fractions

Popular: Continued Fractions | Metric Spaces | Duality

Offline

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

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

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.

New: Integration Problem | Adding Fractions

Popular: Continued Fractions | Metric Spaces | Duality

Offline

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

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

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

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

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

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

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

I just rebooted my PC to try and get under 50 seconds. Success! 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

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

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

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.

New: Integration Problem | Adding Fractions

Popular: Continued Fractions | Metric Spaces | Duality

Offline

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

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

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

New: Integration Problem | Adding Fractions

Popular: Continued Fractions | Metric Spaces | Duality

Offline

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

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

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)*

New: Integration Problem | Adding Fractions

Popular: Continued Fractions | Metric Spaces | Duality

Offline

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

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

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)*

New: Integration Problem | Adding Fractions

Popular: Continued Fractions | Metric Spaces | Duality

Offline

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

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