Jump to content
Science Forums

A Truly Worthwhile Challenge.


Recommended Posts

Quoting Modest:

Don, as far as I know from peeking at the fine structure constant wiki page, the constant is known to about 10 significant digits. Right now, and someone can correct me if I'm wrong because I haven't been keeping up as much as I'd like to, the density of figurate numbers are known up to about 10 significant digits (I think about 100 billion). So, I'm wondering, if the density of a larger number of figs is found, how will you know that you've gotten any closer to the fine structure constant? As beta-x gets more accurate, or more precise, that won't necessarily tell you that you are any closer to alpha-x.

 

There are ways.

 

We can "adjust" [math]\alpha[/math] so that the "percentage of error" in the counting function [math]B(x)[/math] "most quickly" approaches "some constant",

 

or we can simply solve for [math]\alpha[/math] in the more accurate counting function [math]B(x)*\left(1-\frac{\alpha}{\mu-2e}\right)[/math],

 

or we can use several "statistical methods" that I know of,

 

or... you know...you... or some other brilliant Hypographer... might come up with some novel ideas!

 

A lot depends on how wildly [math]\varpi(x)[/math] "fluctuates" at increasingly higher values of [math]x[/math].

 

This function is the only known counting function for a "mainstream" sequence of numbers that involves "physical constants" !

 

Thus, by comparison, all other so called "purely mathematical determinations" of [math]\alpha[/math] and [math]\mu[/math]

are without purpose, serve no usefull function and are therefore...

more akin to "numerology" than they are to actual mathematics or physics.

 

We need this function to very accurately estimate the density of "Turtles numbers"

at high very values of [math]x[/math] because clearly, computers are still way too slow.

 

That it very well may allow us to better determine [math]\alpha[/math] and [math]\mu[/math] makes it all the more remarkable.

 

Don.

Link to comment
Share on other sites

Quoting Modest:

 

There are ways.

 

We can "adjust" [math]\alpha[/math] so that the "percentage of error" in the counting function [math]B(x)[/math] "most quickly" approaches "some constant",

 

or we can simply solve for [math]\alpha[/math] in the more accurate counting function [math]B(x)*\left(1-\frac{\alpha}{\mu-2e}\right)[/math],

 

or we can use several "statistical methods" that I know of,

 

or... you know...you... or some other brilliant Hypographer... might come up with some novel ideas!

 

A lot depends on how wildly [math]\varpi(x)[/math] "fluctuates" at increasingly higher values of [math]x[/math].

 

 

Don.

 

I don't really follow what you mean... perhaps I should explain my concern more clearly. The most precise value of alpha known is apparently given by wikipedia here:

 

The most precise value of α obtained experimentally through the present is based on a new measurement of g using a one-electron so-called "quantum cyclotron" apparatus, together with a calculation via the theory of QED that involved 891 four-loop Feynman diagrams:[4]

 

[math]\alpha^{-1} = 137.035\,999\,084(51)[/math]

 

This measurement of α has a precision of 0.37 parts per billion. This value and uncertainty are about the same as the latest experimental results.[5]

 

 

So, let's say that we find the density of figurates out to 100 trillion. This would presumably allow you to find the fine structure constant using [math]B(x)*\left(1-\frac{\alpha}{\mu-2e}\right)[/math] to 15 significant digits. You might find, for example, that alpha is,

 

[math]\frac{1}{137.035\,999\,084\,627}[/math]

 

But, there is no way of knowing if this hypothetical value of alpha solved from beta-x is more or less accurate than the one you have now. I mean, maybe we find the density of figurates to 21 significant digits and you calculate:

 

[math]\alpha = \frac{1}{137.035\,999\,084\,627\,132\,094}[/math]

 

As far as I know, there is nothing to compare that to in order to check its accuracy, because alpha has only been measured so accurately.

 

Do you see what I mean? I'm not sure what we would accomplish in finding the density of a larger number of figurates.

 

~modest

Link to comment
Share on other sites

If the "density function" determines [math]\alpha[/math] to be [math] \frac{1}{137.035\,999\,084\,627} [/math]

 

and several months (or years) later, physical experiments and/or astronomical observations verify that value,

 

then we will have a most interesting clue on our hands that we can then (and perhaps forever yonder) ponder and play with.

 

Then again, you just never know... given enough such clues, we might even solve a mystery or two in the near or distant future.

 

Besides, (and most importantly) :xparty: it's fun!!! :xparty:.

 

It must be!

 

Physicists, cosmologists, astronimers and other assorted researchers are spending

 

millions of dollars per digit on this number for no "practical" reason whatsoever !

 

Apparently, they are simply curious.

 

Don.

Link to comment
Share on other sites

If the "density function" determines [math]\alpha[/math] to be [math] \frac{1}{137.035\,999\,084\,627} [/math]

 

and several months (or years) later, physical experiments and/or astronomical observations verify that value,

 

then we will have a most interesting clue on our hands that we can then (and perhaps forever yonder) ponder and play with.

 

Then again, you just never know... given enough such clues, we might even solve a mystery or two in the near or distant future.

 

Besides, (and most importantly) :xparty: it's fun!!! :xparty:.

 

I wholeheartedly agree with both points :agree: :D

 

In fact, it is probably better in a scientific sense to predict the value before it is measured than to produce a value previously measured.

 

 

I wonder, have you compared your value to other attempts at deriving alpha as a mathematical constant? Wiki links a rather sparse, but interesting nonetheless, pdf... http://www.vmig-ip.com/FineStructureConstant.html ... that you might compare your value to.

 

~modest

Link to comment
Share on other sites

Quoting Modest:

I wholeheartedly agree with both points

 

Thanks Modest.

 

Quoting Modest again:

In fact, it is probably better in a scientific sense to predict the value

before it is measured than to produce a value previously measured.

 

Wikipedia says that a new, more accurate determination of the FSC

will be coming at the end of this year, or the beginning of the next.

How much fun would it be to post our determination before then,

and hold our collective breaths, and anticipate the outcome?

 

 

Quoting Modest yet again:

I wonder, have you compared your value to other attempts at deriving alpha as a mathematical constant? Wiki links a rather sparse, but interesting nonetheless, pdf... http://www.vmig-ip.c...reConstant.html ... that you might compare your value to.

 

Well, for me, there is no comparison.

 

For one thing, the motivation was completely different.

All I wanted was a density function for Turtles numbers.

(Had Turtle picked any other sequence to take apart and study,

none of this would have happened, and we wouldn't have this result !)

 

For another thing, (and unlike all the other "determinations" of the FSC)

the random fluctuations in [math]\varpi(x)[/math] guarantee that

our determination will include an upper and a lower bound.

 

Don.

Link to comment
Share on other sites

  • 2 weeks later...

so, a new aproach. how about instead of taking the ranks, we try the gons?

here's some observations. the hexagon figurate numbers will be completely covered by the triangular numbers.

the octagonal numbers will be completely covered by the square numbers.

the decagonal numbers will be completely covered by the pentagonal numbers.

and so on, in fact we only need to consider the prime polygonal numbers.

the primary downside: there is some overlap between the gons. in particular, 36 is both square and triangular, as is 1225, 41616, etc.

never the less this may give us a fairly accurate result at a fairly fast rate. i'll try coding this aproach and give you my results.

Link to comment
Share on other sites

so, a new aproach. how about instead of taking the ranks, we try the gons?

here's some observations. the hexagon figurate numbers will be completely covered by the triangular numbers.

the octagonal numbers will be completely covered by the square numbers.

the decagonal numbers will be completely covered by the pentagonal numbers.

and so on, in fact we only need to consider the prime polygonal numbers.

the primary downside: there is some overlap between the gons. in particular, 36 is both square and triangular, as is 1225, 41616, etc.

never the less this may give us a fairly accurate result at a fairly fast rate. i'll try coding this aproach and give you my results.

 

well, we have done that but it is slow. while it is true that all hexagonal numbers are triangular, it is not true that 8-sided numbers are 4-sided, nor that 10-sided numbers are also 5-sided. the remarkable overlap of 3-sided & 6-sided is unique. another twist is that all (known)perfect numbers are 6-sided. :clue: then too, 4-sided numbers are the only polygonal numbers that are all powers. :reallyconfused:

 

i have been at these sets for over a decade & there is decidedly nothing as simple about them as one might think. i have attached a list that you can check over my assertions on 4&8-sided & 5&10-sided numbers. if it looks a decade old, that's because it is. :hihi:

Link to comment
Share on other sites

make no mistake ladies & germs, that we are in good company. :turtle: :read:

 

Gnomon: from pharaohs to fractals

pg. 15: ...Ever since ancient Greece, generations of mathematicians have been fascinated by figurate numbers and their properties, and Fermat conjectured that any integer could be expressed as the sum of at most m m-gonal numbers. Consider for example the integer 15. We find

Triangular: 15=6+6+3

Square: 15=9+4+1+1

Pentagonal: 15=5+5+5

Hexagonal: 15=6+6+1+1+1

Heptagonal: 15=7+7+1

In his Disquisitiones arithmeticae, Gauss was able to prove the conjecture for triangular and square numbers. It was Cauchy, however, who provided the general proof. ...

 

Edit:9:06 pm thought i'd point out that fermat, gauss, & cauchy include the trivial cases n=1 & n=2 and so there is no sense for them to talk about the density of the polygonal numbers as we have explored. also, while they say "figurate", they mean "polygonal". we dance on the graves of giants! :rip: :rip: :rip: :hal_skeleton: :D

Link to comment
Share on other sites

So, I was thinking of putting my perl script...

 

use Math::BigFloat;

for ($x = Math::BigFloat->new(1000000000,20); $x < 2000000000; $x++){
 my $s = Math::BigFloat->new(3,20);
 my $n = Math::BigFloat->new(3,20);

 while ($s > 2){
   $s = (2*$x + 2*$n**2 - 4*$n)/($n**2 - $n);
   if ($s < 3){print int($x)," is nonfig \n"; last;}
   if ($s == int($s)){print int($x)," is figurate at n = ",int($n),", s = ",int($s),"\n"; last;}
   $s->bfloor();	
   $n = (sqrt($x*(8*$s-16) + ($s-4)**2)+$s-4) / (2*$s-4);
   if ($n == int($n)){print int($x)," is figurate at n = ",int($n),", s = ",int($s),"\n"; last;}
   $n->bceil();	
 }
}

 

In c++ so that we might see how fast it is in a reasonable language, and maybe distribute the problem like T has been saying. But, my coding skills are absolutely daft and I thought it would be fun to showcase just how daft in a real time public kind of way :hihi:

 

If I were to make a first run at this... let's see...

 

#include <iostream>
using namespace std;

int main (){
 double x, s, n;
 for (x = 1000; x <= 2000 ; x++){
   s = 3;
   n = 3;
   while (s > 2){
     s = (2*x + 2*n**2 - 4*n)/(n**2 - n);
     if (s < 3){
       cout << x << " is nonfig \n"; 
       break;
     }
     if (s == floor(s)){
       cout << x << " is figurate at n = " << n << " s = " << s << "\n"; 
       break;
     }
     s = floor(s);       
     n = (sqrt(x*(8*s-16) + (s-4)**2)+s-4) / (2*s-4);
     if (n == floor(n)){
       cout << x << " is figurate at n = " << n << " s = " << s << "\n"; 
       break;
     }
     n = ceil(n);        
   }
 }
 return 0;
}

 

So, if I knew what I was doing, this would identify which numbers between 1,000 and 2,000 are fig or non-fig. Let me find a compiler....

 

...ok, that was harder than I thought it would be :(

 

Needing to hit the sack, I'll quote the compiler's current complaints:

 

fig.cpp

fig.cpp(10) : error C2100: illegal indirection

fig.cpp(10) : error C2100: illegal indirection

fig.cpp(15) : error C3861: 'floor': identifier not found

fig.cpp(19) : error C3861: 'floor': identifier not found

fig.cpp(20) : error C2100: illegal indirection

fig.cpp(20) : error C3861: 'sqrt': identifier not found

fig.cpp(21) : error C3861: 'floor': identifier not found

fig.cpp(25) : error C3861: 'ceil': identifier not found

 

I thought ceil() and floor() were c++ functions... maybe I need to include another library. Any help would be much appreciated.

 

~modest

Link to comment
Share on other sites

Ok, success, I believe :)

 

The code...

 

#include <iostream>
#include <math.h>
using namespace std;

int main (){
 double x, s, n;
 cout.precision(15);
 for (x = 10; x <= 300 ; x++){
   s = 3;
   n = 3;
   while (s > 2){
     s = (2*x + 2*pow(n,2) - 4*n)/(pow(n,2) - n);
     if (s < 3){
       cout << x << " is nonfig \n"; 
       break;
     }
     if (s == floor(s)){
       cout << x << " is figurate at n = " << n << " s = " << s << "\n"; 
       break;
     }
     s = floor(s);       
     n = (sqrt(x*(8*s-16) + pow((s-4),2))+s-4) / (2*s-4);
     if (n == floor(n)){
       cout << x << " is figurate at n = " << n << " s = " << s << "\n"; 
       break;
     }
     n = ceil(n);        
   }
 }
 return 0;
}

 

generates the following:

 

10 is figurate at n = 4 s = 3
11 is nonfig
12 is figurate at n = 3 s = 5
13 is nonfig
14 is nonfig
15 is figurate at n = 3 s = 6
16 is figurate at n = 4 s = 4
17 is nonfig
18 is figurate at n = 3 s = 7
19 is nonfig
20 is nonfig
21 is figurate at n = 3 s = 8
22 is figurate at n = 4 s = 5
23 is nonfig
24 is figurate at n = 3 s = 9
25 is figurate at n = 5 s = 4
26 is nonfig
27 is figurate at n = 3 s = 10
28 is figurate at n = 4 s = 6
29 is nonfig
30 is figurate at n = 3 s = 11
31 is nonfig
32 is nonfig
33 is figurate at n = 3 s = 12
34 is figurate at n = 4 s = 7
35 is figurate at n = 5 s = 5
36 is figurate at n = 3 s = 13
37 is nonfig
38 is nonfig
39 is figurate at n = 3 s = 14
40 is figurate at n = 4 s = 8
41 is nonfig
42 is figurate at n = 3 s = 15
43 is nonfig
44 is nonfig
45 is figurate at n = 3 s = 16
46 is figurate at n = 4 s = 9
47 is nonfig
48 is figurate at n = 3 s = 17
49 is figurate at n = 7 s = 4
50 is nonfig
51 is figurate at n = 3 s = 18
52 is figurate at n = 4 s = 10
53 is nonfig
54 is figurate at n = 3 s = 19
55 is figurate at n = 5 s = 7
56 is nonfig
57 is figurate at n = 3 s = 20
58 is figurate at n = 4 s = 11
59 is nonfig
60 is figurate at n = 3 s = 21
61 is nonfig
62 is nonfig
63 is figurate at n = 3 s = 22
64 is figurate at n = 4 s = 12
65 is figurate at n = 5 s = 8
66 is figurate at n = 3 s = 23
67 is nonfig
68 is nonfig
69 is figurate at n = 3 s = 24
70 is figurate at n = 4 s = 13
71 is nonfig
72 is figurate at n = 3 s = 25
73 is nonfig
74 is nonfig
75 is figurate at n = 3 s = 26
76 is figurate at n = 4 s = 14
77 is nonfig
78 is figurate at n = 3 s = 27
79 is nonfig
80 is nonfig
81 is figurate at n = 3 s = 28
82 is figurate at n = 4 s = 15
83 is nonfig
84 is figurate at n = 3 s = 29
85 is figurate at n = 5 s = 10
86 is nonfig

[...snip...]

257 is nonfig
258 is figurate at n = 3 s = 87
259 is figurate at n = 7 s = 14
260 is figurate at n = 8 s = 11
261 is figurate at n = 3 s = 88
262 is figurate at n = 4 s = 45
263 is nonfig
264 is figurate at n = 3 s = 89
265 is figurate at n = 5 s = 28
266 is nonfig
267 is figurate at n = 3 s = 90
268 is figurate at n = 4 s = 46
269 is nonfig
270 is figurate at n = 3 s = 91
271 is nonfig
272 is nonfig
273 is figurate at n = 3 s = 92
274 is figurate at n = 4 s = 47
275 is figurate at n = 5 s = 29
276 is figurate at n = 3 s = 93
277 is nonfig
278 is nonfig
279 is figurate at n = 3 s = 94
280 is figurate at n = 4 s = 48
281 is nonfig
282 is figurate at n = 3 s = 95
283 is nonfig
284 is nonfig
285 is figurate at n = 3 s = 96
286 is figurate at n = 4 s = 49
287 is figurate at n = 14 s = 5
288 is figurate at n = 3 s = 97
289 is figurate at n = 17 s = 4
290 is nonfig
291 is figurate at n = 3 s = 98
292 is figurate at n = 4 s = 50
293 is nonfig
294 is figurate at n = 3 s = 99
295 is figurate at n = 5 s = 31
296 is nonfig
297 is figurate at n = 3 s = 100
298 is figurate at n = 4 s = 51
299 is nonfig
300 is figurate at n = 3 s = 101

 

which looks correct in a quick comparison to a list in the non-figurate number thread. When I get back to the computer this evening I'll add some functionality (input, output, computing density and whatnot) and I'll attach the program

 

~modest

Link to comment
Share on other sites

Ok, success, I believe :)

 

The code...

 

#include <iostream>
#include <math.h>
using namespace std;

int main (){
 double x, s, n;
 cout.precision(15);
 for (x = 10; x <= 300 ; x++){
   s = 3;
   n = 3;
   while (s > 2){
     s = (2*x + 2*pow(n,2) - 4*n)/(pow(n,2) - n);
     if (s < 3){
       cout << x << " is nonfig \n"; 
       break;
     }
     if (s == floor(s)){
       cout << x << " is figurate at n = " << n << " s = " << s << "\n"; 
       break;
     }
     s = floor(s);       
     n = (sqrt(x*(8*s-16) + pow((s-4),2))+s-4) / (2*s-4);
     if (n == floor(n)){
       cout << x << " is figurate at n = " << n << " s = " << s << "\n"; 
       break;
     }
     n = ceil(n);        
   }
 }
 return 0;
}

 

generates the following:

 

10 is figurate at n = 4 s = 3
11 is nonfig
12 is figurate at n = 3 s = 5
13 is nonfig
14 is nonfig
15 is figurate at n = 3 s = 6
oh snap...

 

which looks correct in a quick comparison to a list in the non-figurate number thread. When I get back to the computer this evening I'll add some functionality (input, output, computing density and whatnot) and I'll attach the program

 

~modest

 

 

:thumbs_up a few more observations. :clue:

 

we do not need code identifying figurate numbers or their generating variables & eliminating all that will speed us up. just as we can find figurate natural density by subtracting the natural density of non-figs from 1 at any point, we can find figurates by comparing the non-fig list to a list of all natural numbers at any point. it is actually the reverse of this which led me to find non-figurates in the first place, i.e. looking at that list of figurates that i attached a couple posts back (constructed by the way as phillip just suggested), i noticed there were numbers missing. voila! i dub thee the non-figurate numbers!! :magic:

 

another note on your output for figurates as long as we still have it here is that it only gives 1 variable pair solution even when more are to be had. for example, it is correct that 15 is the 3rd 6-sided number as indicated, but 15 is also the 5th 3-sided number.

 

to infinity & beyond!! :dance:

Link to comment
Share on other sites

:thumbs_up a few more observations. :clue:

 

we do not need code identifying figurate numbers or their generating variables & eliminating all that will speed us up. just as we can find figurate natural density by subtracting the natural density of non-figs from 1 at any point, we can find figurates by comparing the non-fig list to a list of all natural numbers at any point. it is actually the reverse of this which led me to find non-figurates in the first place, i.e. looking at that list of figurates that i attached a couple posts back (constructed by the way as phillip just suggested), i noticed there were numbers missing. voila! i dub thee the non-figurate numbers!! :magic:

 

Yeah, I got ya. At that point in the code it is essentially checking if they are figurate and if it, at any point, finds that they are then it exits the loop. I also put in a print command for no other reason than checking that the program was working correctly. But, yes, I agree with you and the following code does not keep track of figs... it gives the number of figs by subtracting the number of nonfigs found from the total number searched.

 

another note on your output for figurates as long as we still have it here is that it only gives 1 variable pair solution even when more are to be had. for example, it is correct that 15 is the 3rd 6-sided number as indicated, but 15 is also the 5th 3-sided number.

 

Right :agree: That's just the first one it finds with that code... yep...

 

I'm getting pulled out of the door...

 

The newest code:

 

#include <iostream>
#include <math.h>
#include <conio.h> 
using namespace std;

int main (){
 double x, s, n, min, max, nonfig, every, count;
 count = 1;
 every = 1000000;
 cout.precision(15);
 cout << "Density of non-figurate numbers search. \nResults will be displayed every 1 millionth number. \nPress control-c to stop the search prematurely. \n\n";
 cout << "Please enter a positive integer lower bound for the search area: ";
 cin >> min;
 cout << "Please enter a positive integer upper bound for the search area: ";
 cin >> max;
 cout << "Searching...\n";
 for (x = min; x <= max ; x++){
   if ((fmod(x,3) != 0) && (fmod((x-4),6) != 0) && (fmod((x-5),10) != 0) && (fmod((x-6),15) != 0)){
     s = 3;
     n = 3;
     while (s > 2){
       s = (2*x + 2*pow(n,2) - 4*n)/(pow(n,2) - n);
       if (s < 3){ nonfig++; break; }
       if (s == floor(s)){ break; }
       s = floor(s);       
       n = (sqrt(x*(8*s-16) + pow((s-4),2))+s-4) / (2*s-4);
       if (n == floor(n)){ break; }
       n = ceil(n);        
     }
   }
   if (count >= every){
     cout << "\n" << "Between and including " << min << " and " << x << " there are \n" << nonfig << " nonfigurate numbers \nand\n" << x-min+1-nonfig << " figurate numbers \nfor a total of " << x-min+1 << " numbers searched \n\nSearching...\n\n";
     count = 0;
   }
   count++;
 }
 x--;
 cout << "\n" << "Between and including " << min << " and " << x << " there are \n" << nonfig << " nonfigurate numbers \nand\n" << x-min+1-nonfig << " figurate numbers \nfor a total of " << x-min+1 << " numbers searched \n\n";
 cout << "Press any key to end program ";
 _getch();
 return 0;
}

 

gives this output:

 

Density of non-figurate numbers search.
Results will be displayed every 1 millionth number.
Press control-c to stop the search prematurely.

Please enter a positive integer lower bound for the search area: 1000000000
Please enter a positive integer upper bound for the search area: 1001000000
Searching...

Between and including 1000000000 and 1001000000 there are
359651 nonfigurate numbers
and
640350 figurate numbers
for a total of 1000001 numbers searched

Press any key to end program

 

which... very, very unfortunately took 2.5 minutes. Argh... perhaps I'm not programming it efficiently.

 

I'll attach the program...

 

Ok, I can't figure out how at the moment... pulled out the door...

 

here's a link:

 

http://www.box.net/shared/ivg01uuy9d

 

~modest

Link to comment
Share on other sites

I'm getting pulled out of the door...

 

The newest code:

 

... clip ...
Between and including 1000000000 and 1001000000 there are
359651 nonfigurate numbers
and
640350 figurate numbers
for a total of 1000001 numbers searched

Press any key to end program

 

which... very, very unfortunately took 2.5 minutes. Argh... perhaps I'm not programming it efficiently.

 

I'll attach the program...

 

Ok, I can't figure out how at the moment... pulled out the door...

 

here's a link:

 

http://www.box.net/shared/ivg01uuy9d

 

~modest

 

schweet! i'll have to leave the coding nuances to qualified hands, but i'd say the time taken in your run is not as much about the code as it is about the big numbers. it's a hard problem that we have bit into because we must check each & every integer and barring us finding a magic formula for non-figs, things are only going to get sloooowwwwer as the numbers get bigger. by using distributed computing we enter many turtles to the race to infinity, instead of trying to enter just a hare. right up an allegorical turtle's alley. ;) . . . . . . . :turtle: :turtle: :turtle: :turtle: :turtle: :turtle:

Link to comment
Share on other sites

...Does anyone know where we're at in calculating the density of figs and non-figs? Was it one billion?...

 

yep; 1 billion is donk's mark...

I think it may be a bit higher :)

 

...As you can see here:

 

http://donblazys.com/on_polygonal_numbers_3.pdf

 

the present record is just above [math]\varpi(10^{12})[/math],...

 

...It took about 62 hours to get to 10^11:

 

            10                 3
           100                57
         1 000               622
        10 000             6 357
       100 000            63 889
     1 000 000           639 946
    10 000 000         6 402 325
   100 000 000        64 032 121
 1 000 000 000       640 349 979
10 000 000 000     6 403 587 409
100 000 000 000    64 036 148 166

...

 

Fantastic :) :) :)

 

schweet! i'll have to leave the coding nuances to qualified hands, but i'd say the time taken in your run is not as much about the code as it is about the big numbers. it's a hard problem that we have bit into because we must check each & every integer and barring us finding a magic formula for non-figs, things are only going to get sloooowwwwer as the numbers get bigger. by using distributed computing we enter many turtles to the race to infinity, instead of trying to enter just a hare.

 

I agree in principle, but I'm pretty sure after running the program for a while that this algorithm isn't going to get 'er done—even with many computers distributing the problem :(

 

I set it running early this morning and after some number of hours it has progressed only from 1 billion to 1.27 billion. Unless I've done something terribly inefficient with the code... :shrug:

 

~modest

 

EDIT-->

 

I can at least confirm Donk's count quoted above out to 10^8. I get the same number of figs :agree:

Link to comment
Share on other sites

I think it may be a bit higher :)

:doh: :kick:

 

100 000 000 000 64 036 148 166

Fantastic :) :) :)

:thumbs_up got it; one hundred billion

yada yada slow...yada. :wink:
I agree in principle, but I'm pretty sure after running the program for a while that this algorithm isn't going to get 'er done—even with many computers distributing the problem :(

 

I set it running early this morning and after some number of hours it has progressed only from 1 billion to 1.27 billion. Unless I've done something terribly inefficient with the code... :shrug:

 

~modest

 

EDIT-->

 

I can at least confirm Donk's count quoted above out to 10^8. I get the same number of figs :agree:

 

ok then, let's at least brake break some new ground while the programmers look over the specs. since we trust donk's result & yours matches it, there's no need to repeat it. take your baby out to the end of the track, lock it in at 100 000 000 001 & punch it! :steering:

Link to comment
Share on other sites

yada yada slow...yada. :wink:

 

:hihi:

 

ok then, let's at least brake break some new ground while the programmers look over the specs. since we trust donk's result & yours matches it, there's no need to repeat it. take your baby out to the end of the track, lock it in at 100 000 000 001 & punch it! :steering:

 

Ok :agree:

 

Let me try a few things to see where it might be going wrong or where it might be sped up then I'll let it ride.

 

~modest

Link to comment
Share on other sites

i wanted to apologize for my previous post, it was hasty and bad form.

anyway here's my newest aproach.

import time, math
t0 = time.time()
max = 10**7+1
row = 10
column = 6
inc = 4
total = 0
array = list(range(6,max,3))
while row < max:
array += list(range(row,max,column))
column = row
inc += 1
row += inc
if inc%3 == 0:
	column = row
	inc += 1
	row += inc
array.sort()
for i in range(1,len(array)):
if array[i-1] != array[i]:
	total += 1
t0 =time.time()-t0
print(total,t0)

this takes 4 seconds to run, making it my fastest program yet. the obvious downside is that it can't be extended to larger values as the array is limited in size. or can it? here's my idea. calculate intermediate values and store them in an array, clearing the array once in a while. so here's what i would need from you guys. (for some reason i can't think striaght right now.) say i go to 100, then for each rank i want the next number above 100. what would be the formula for that, in terms if row, column and inc?

for example, 102 would be the next figurate rank 3 row 6 column 3, 106 would be the next figurate rank 4 row 10 column 6, 105 would be the next figurate rank 5 row 15 column 10, etc.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...