1 billionth ugly or hamming number?
Asked Answered
S

2

-4

Is this the 1 billionth ugly/hamming number?

62565096724471903888424537973014890491686968126921250076541212862080934425144389 76692222667734743108165348546009548371249535465997230641841310549077830079108427 08520497989078343041081429889246063472775181069303596625038985214292236784430583 66046734494015674435358781857279355148950650629382822451696203426871312216858487 7816068576714140173718

Does anyone have code to share that can verify this? Thanks!

Shanney answered 15/6, 2016 at 0:34 Comment(1)
As it currently is written, this doesn't seem to be a very good question. It will either attract very poor answers ("yes"/"no") or it is too broad ("Write me code to prove this in an unspecified programming language"). In any case, you should do some research first and include that.Revet
W
1

This SO answer shows a code capable of calculating it.

The test entry on ideone.com takes 1.1 0.05 sec for 109 (2016-08-18: main speedup due to usage of Int instead of the default Integer where possible, even on 32-bit; additional 20% thanks to the tweak suggested by @GordonBGood, bringing band size complexity down to O(n1/3)).

It gives the answer as ((1334,335,404),"6.21607575556559E+843"), i.e.

    21334 * 3335 * 5404 ≈ 6.21607575556559 * 10843.

(coincidentally, only two last digits in the fractional number above are incorrect).

This also means, of course, that there are 404 zeroes at the end of this number, and that it has 844 digits in total. So no, the number you show isn't it.

Waterborne answered 15/6, 2016 at 10:37 Comment(0)
H
1

Exact answer: 6216075755565244861630816332872072003947056519089652706591632409642337022002753141824417540777256732780370172616615291935540418620025524916729500086831454711313694078635504004160312872951788703647948382456091072701600790562071797590306654765882256990391763887850141154482249915927439184562828227449023750262318234797192076792208033475638322151983772515798004125909334741121595323950448656375104457026997424772966917441779406172736975588556800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

Harlem answered 16/10, 2017 at 23:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.