Talk:Smallest Differences between Fractional Parts of Square and Cube Roots

The code in Pari/GP: y=1;for(i=2,1000000,{x=frac(i^(1/2)-i^(1/3));if(x<y&&x!=0,printf("%u\n%f\n",i,x);y=x);})

gives the output: 2 0.15429251247822188403447811693146972800 10 0.0078429701364956102395999779133680384639 42 0.0047140535214104442261022170834592237132 800 0.0010935802363431912136217823550684183680 1570 0.00071670015618963611244737578937671705410 3087 0.00019077099307359882353305591927123567904 3223 0.00012466199940739396224222806383259287238 14771 0.000029087570472944050280604781912358337501 30739 0.000015123264403485537324746217861195913828 62324 0.000011575707272908687499041005287330203218 147313 0.0000045703848731831388099157950289968827804 149008 0.0000030146447420051098309567216693819302936 568258 0.00000086558489400850481329186187672034447644

A less brute force method is calculating $y = 1 + \floor {x^6}$ for the (real) root of $x^3 - x^2 = n$, $n \in \N$, and only checking $\floor{\sqrt y - \sqrt[3]y}$ for these $y$.

We only need to check these values because $\sqrt y - \sqrt[3]y$ is strictly increasing, but we need to "solve" a cubic.

Indeed this is much faster: y=1;for(i=0,100000,{z=solve(x=1,i+2,x^3-x^2-i);z=floor(1+z^6);x=frac(z^(1/2)-z^(1/3));if(x<y&&x!=0,printf("%u\n%f\n",z,x);y=x);})

gives the output:

2 0.15429251247822188403447811693146972800 10 0.0078429701364956102395999779133680384639 42 0.0047140535214104442261022170834592237132 800 0.0010935802363431912136217823550684183680 1570 0.00071670015618963611244737578937671705410 3087 0.00019077099307359882353305591927123567904 3223 0.00012466199940739396224222806383259287238 14771 0.000029087570472944050280604781912358337501 30739 0.000015123264403485537324746217861195913828 62324 0.000011575707272908687499041005287330203218 147313 0.0000045703848731831388099157950289968827804 149008 0.0000030146447420051098309567216693819302936 568258 0.00000086558489400850481329186187672034447644 5781520 0.00000081127946854979189556181719049994553767 7142707 0.00000065780010368311972839306026076437823006 8260736 0.00000032019600682982970775657159445725631213 15167405 0.00000025914765043422472045608642707358843900 17302647 0.00000022770955998707227611376619039797748733 17748069 0.00000021401297343946172863158406338736302263 18368515 0.00000010153877047848596642664175919935294578 21098622 0.000000097681440377592528716085851194028439373 39613036 0.000000076460190223149325162264813391918394990 41022551 0.000000041535871374840429908879549601827250567 51302476 0.000000021336730803744087432900045717165324766 56143750 0.000000016670145444482060478255370836310394893 171251830 0.000000015061907290533350722056303247241877074 262947407 0.00000000065191479569633480374447053476585426287 1240338144 0.00000000033602710690060077106396217361801553900 1802945312 0.00000000030524606353367716865784992171483162902 2758397060 0.00000000025668214511161219672847521111624969493

This program breezes past two billion in less time than the first program takes to reach a million.

This gives all the terms of the potential sequence under $2 \, 758 \, 397 \, 061$:
 * $2, 10, 42, 800, 1570, 3087, 3223, 14771, 30739, 62324, 147313, 149008, 568258, 5781520, 7142707, 8260736,$
 * $15167405, 17302647, 17748069, 18368515, 21098622, 39613036, 41022551, 51302476, 56143750, 171251830, 262947407, 1240338144, 1802945312, 2758397060$

This sequence is not documented in the OEIS. --RandomUndergrad (talk) 11:17, 30 March 2022 (UTC)


 * With the work that you did, I would suggest to submit this to OEIS for inclusion. In my experience they are quite generous with taking new submissions on board. &mdash; Lord_Farin (talk) 12:58, 30 March 2022 (UTC)


 * Yes indeed, they've got several of mine. Only problem is that their UI is even more fussy about formatting than.