Talk:First perfect square in base n with n unique digits: Difference between revisions
Talk:First perfect square in base n with n unique digits (view source)
Revision as of 22:51, 27 May 2019
, 4 years ago→Optimization when no extra digit required
Line 364:
Real: 00:00:00.204, CPU: 00:00:00.300, GC gen0: 14, gen1: 2
val it : int = 1026753849
</pre><br>which seems to save the expected two thirds time. This is a little trickier when an extra digit is required because you would have to check each extra digit separately (they would have different Digital Roots).<br>The sequence 1 4 9 7 7 9 4 1 9 1 4 9 7 7 9 4 1 9 1 4 can be produced as (n*n)%9 -> 1 4 0 7 7 0 4 1 0 1 4 0 7 7 0 4 1 0 1 4 for n = 1 to
|