mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Miscellaneous Math

Reply
 
Thread Tools
Old 2011-03-09, 14:22   #100
xilman
Bamboozled!
 
xilman's Avatar
 
"๐’‰บ๐’ŒŒ๐’‡ท๐’†ท๐’€ญ"
May 2003
Down not across

2A2116 Posts
Default

Quote:
Originally Posted by Don Blazys View Post
What is a "raw count"?
It's one without any further processing and, in particular, no attempt to use your function which you've fitted to earlier data.

Paul
xilman is offline   Reply With Quote
Old 2011-03-09, 14:41   #101
xilman
Bamboozled!
 
xilman's Avatar
 
"๐’‰บ๐’ŒŒ๐’‡ท๐’†ท๐’€ญ"
May 2003
Down not across

3×5×719 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
according to my blazy function (not blazy2 that would take too long(that and my computer restarted last night so unless i look through my log file I'll never find it.) I get
Code:
(08:59)>blazy(2000000000000)
%1 = 1280724920347.099493640852596
in 0 ms.

and

Code:
(09:01)>blazy(10000000000000)
%2 = 6403626165691.467931734187920
also in 0 ms.
Ok, the true counts for these values are 1280724918033 and 6403626146905 respectively. The difference between the estimates you posted and the true counts are 2314 and 18786 respectively.

The fitted function is still quite close but it is starting to look like as if it over-estimates the counts at large values of its argument.

We should soon have counts as high as 4e13 and can test Blazys' hypothesis further.

Paul
xilman is offline   Reply With Quote
Old 2011-03-09, 15:38   #102
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Default

Quote:
Originally Posted by xilman View Post
The fitted function is still quite close but it is starting to look like as if it over-estimates the counts at large values of its argument.
That was what it was looking like with my numbers, too. Still, the Ansatz looks right: the function behaves very much like c_1n+c_2\sqrt n.

Best-fit coefficients:
c1 = 0.640362740389
c2 = -0.397518352268

Blazys:
c1 = 0.64036274310
c2 = -0.40011254372

Last fiddled with by CRGreathouse on 2011-03-09 at 16:15
CRGreathouse is offline   Reply With Quote
Old 2011-03-09, 16:10   #103
akruppa
 
akruppa's Avatar
 
"Nancy"
Aug 2002
Alexandria

2,467 Posts
Default

Quote:
Originally Posted by xilman View Post
Mail me if you would like a copy of the code for comparison
I've deleted mine right after my posting.
akruppa is offline   Reply With Quote
Old 2011-03-09, 19:51   #104
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

838410 Posts
Default

Quote:
Originally Posted by xilman View Post
We should soon have counts as high as 4e13 and can test Blazys' hypothesis further.

Paul
Code:
(10:40)>blazy(4*10^13)
%16 = 25614507193299.7888452548097563947823880
this is what I get.
science_man_88 is offline   Reply With Quote
Old 2011-03-09, 21:19   #105
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default

once you prove if it's accurate you might want this one:

Code:
(17:17)>blazy(4*10^100000000)
%18 = 2.56145097238337059635728678312415503847 E100000000
(17:17)>##
  ***   last result computed in 32,156 ms.
(17:18)>
science_man_88 is offline   Reply With Quote
Old 2011-03-10, 04:13   #106
R.D. Silverman
 
R.D. Silverman's Avatar
 
Nov 2003

11101001001002 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
That was what it was looking like with my numbers, too. Still, the Ansatz looks right: the function behaves very much like c_1n+c_2\sqrt n.

Best-fit coefficients:
c1 = 0.640362740389
c2 = -0.397518352268

Blazys:
c1 = 0.64036274310
c2 = -0.40011254372
May I suggest that some actual mathematical analysis might be
beneficial, rather just doing a 'least-squares' fit to the data?

Counting these numbers (as already pointed out) is easy with a sieve.

We can get a very easy (and very very sharp!) estimate for the
total number of polygonal numbers less than (say) B via
Euler-Maclauren summation. We have the counting function
for r-gonal numbers:

c(r,n) = 1/2n ( (r-2)n - (r-4))

So just solve c(r,n) < B for n as a function of r and B (a trivial
quadratic equation), then do a Stieltje's integration over r.

But this will give multiple counts of some elements since there are many
duplicates.

Fortunately, the technique for getting a sharp estimate of duplicates
in a sieve was presented many years ago by DeBruijn in a paper
called something like "On the number of uncancelled elements in the
Sieve of Eratosthenes". This paper showed how to get a good estimate
of the duplicate hits in a sieve through the use of the Buchstab function.
This function is very oscillatory and is given by a differential-delay
equation similar to the Dickman's functional equation.

It's been many (~25?) years since I read this paper. I will try to dig
it out of my archives an re-read it. I suggest that reading this paper
and applying its techniques is a requirement for anyone who wants to
proceed further.
R.D. Silverman is offline   Reply With Quote
Old 2011-03-10, 04:49   #107
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3×1,993 Posts
Default

Quote:
Originally Posted by R.D. Silverman View Post
May I suggest that some actual mathematical analysis might be
beneficial, rather just doing a 'least-squares' fit to the data?
The purpose of the fit was to show that, even at the second or third decimal place, Blazys' (second) constant appears to be off.

But yes, I would like to analyze this mathematically (as, indeed, I was discussing yesterday with Paul). My initial attempts were based on pairwise intersections between forms, but the cancellation is too high with that method. My next thought was do a Legendre sieve-type calculation -- count contributions for all orders but cancellations only for small orders, bounding the overlap from higher orders. I'm not sure if this can extract enough information.

I'll look into the paper you suggest, but at first glance it's not clear how to apply it to the problem at hand. Hmm... we *do* have a (small-sieve) equivalent of Buchstab's identity, so I guess it's not hopeless.

Quote:
Originally Posted by R.D. Silverman View Post
Counting these numbers (as already pointed out) is easy with a sieve.
Sure, I've already logged a few dozen core-hours sieving on the problem. I had meant to code an improved sieve today (based on an idea stolen from Tomรกs Oliveira e Silva) but I've been working on other things.

Quote:
Originally Posted by R.D. Silverman View Post
We can get a very easy (and very very sharp!) estimate for the
total number of polygonal numbers less than (say) B via
Euler-Maclauren summation. We have the counting function
for r-gonal numbers:

c(r,n) = 1/2n ( (r-2)n - (r-4))

So just solve c(r,n) < B for n as a function of r and B (a trivial
quadratic equation), then do a Stieltje's integration over r.
That gives way too much overlap to be useful. All numbers = 15 mod 30 are polygonal of order 3 and 5, so it overcounts by at least n/30, which is *huge* compared to the precision to which we've empirically determined the coefficients.

Quote:
Originally Posted by R.D. Silverman View Post
Fortunately, the technique for getting a sharp estimate of duplicates
in a sieve was presented many years ago by DeBruijn in a paper
called something like "On the number of uncancelled elements in the
Sieve of Eratosthenes". This paper showed how to get a good estimate
of the duplicate hits in a sieve through the use of the Buchstab function.
This function is very oscillatory and is given by a differential-delay
equation similar to the Dickman's functional equation.
I have some old code I could dust off for computing Dickman's function, perhaps that could be adopted for the relevant function here. But I'm still not clear on how to adapt the techniques of the paper to this not-entirely-similar problem.

Last fiddled with by CRGreathouse on 2011-03-10 at 04:50
CRGreathouse is offline   Reply With Quote
Old 2011-03-10, 13:31   #108
R.D. Silverman
 
R.D. Silverman's Avatar
 
Nov 2003

22·5·373 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
The purpose of the fit was to show that, even at the second or third decimal place, Blazys' (second) constant appears to be off.

But yes, I would like to analyze this mathematically (as, indeed, I was discussing yesterday with Paul). My initial attempts were based on pairwise intersections between forms, but the cancellation is too high with that method. My next thought was do a Legendre sieve-type calculation -- count contributions for all orders but cancellations only for small orders, bounding the overlap from higher orders. I'm not sure if this can extract enough information.

I'll look into the paper you suggest, but at first glance it's not clear how to apply it to the problem at hand. Hmm... we *do* have a (small-sieve) equivalent of Buchstab's identity, so I guess it's not hopeless.



Sure, I've already logged a few dozen core-hours sieving on the problem. I had meant to code an improved sieve today (based on an idea stolen from Tomรกs Oliveira e Silva) but I've been working on other things.



That gives way too much overlap to be useful. All numbers = 15 mod 30 are polygonal of order 3 and 5, so it overcounts by at least n/30, which is *huge* compared to the precision to which we've empirically determined the coefficients.



I have some old code I could dust off for computing Dickman's function, perhaps that could be adopted for the relevant function here. But I'm still not clear on how to adapt the techniques of the paper to this not-entirely-similar problem.
I am at home, recovering from surgery and the paper is in my office.
It will be a few days before I can retrieve it. The paper is quite old
and I doubt whether it is available on the net.
R.D. Silverman is offline   Reply With Quote
Old 2011-03-10, 13:43   #109
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default

Quote:
Originally Posted by R.D. Silverman View Post
I am at home, recovering from surgery and the paper is in my office.
It will be a few days before I can retrieve it. The paper is quite old
and I doubt whether it is available on the net.
I hope you get tons of rest. I presented a slow code in post 54 ?
Code:
blazy2(x)=y=[];for(k=3,x+1,for(n=3,x+1,if((1+k*n*(n-1)/2-(n-1)^2)<(x+1),y=concat(y,[(1+k*n*(n-1)/2-(n-1)^2)]),break(1))));y=vecsort(y,,8);return(#y)
science_man_88 is offline   Reply With Quote
Old 2011-03-10, 14:22   #110
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

135338 Posts
Default

Quote:
Originally Posted by R.D. Silverman View Post
I am at home, recovering from surgery and the paper is in my office.
It will be a few days before I can retrieve it. The paper is quite old
and I doubt whether it is available on the net.
Fortunately, it seems to be online, age notwithstanding:
http://alexandria.tue.nl/repository/...les/597489.pdf
CRGreathouse is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Do-it-yourself, crank, mersenne prediction thread. Uncwilly Miscellaneous Math 85 2017-12-10 16:03
non-standard sieve req Math 4 2011-12-06 04:17
Crank Emoticon Mini-Geek Forum Feedback 21 2007-03-06 19:21
Remove my thread from the Crank Forum amateurII Miscellaneous Math 40 2005-12-21 09:42
Standard Deviation Problem jinydu Puzzles 5 2004-01-10 02:12

All times are UTC. The time now is 04:38.


Fri Aug 6 04:38:32 UTC 2021 up 13 days, 23:07, 1 user, load averages: 2.62, 2.81, 3.84

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.