Greatest prime dividing the n-th cubefree number: Difference between revisions

Content added Content deleted
(→‎resursive alternative: changed to search for count of cubefree numbers)
m (→‎resursive alternative: correct max prime factor to test 2,642,246)
Line 553: Line 553:
</pre>
</pre>
===resursive alternative===
===resursive alternative===
Using Apéry's Constant, which is a quite good estimate.<br>Only checking powers of 10.Not willing to test prime factors > 6,98e12-> 0
Using Apéry's Constant, which is a quite good estimate.<br>Only checking powers of 10.Not willing to test prime factors > 2,642,246-> 0
<syntaxhighlight lang="pascal">
<syntaxhighlight lang="pascal">
program CubeFree3;
program CubeFree3;
Line 738: Line 738:
CntDivs := 0;
CntDivs := 0;
check(lmt,0,true);
check(lmt,0,true);
//new apromitaion
//new approximation
inc(lmt,trunc(Z3*(dezlmt-cnt)));
inc(lmt,trunc(Z3*(dezlmt-cnt)));
until cnt = dezLmt;
until cnt = dezLmt;