Talk:First perfect square in base n with n unique digits: Difference between revisions

Added comment about using congruence formula to calculate digital root.
m (→‎Optimization when no extra digit required: possible improve of Digital root GO - Version)
(Added comment about using congruence formula to calculate digital root.)
Line 388:
return r
}</lang>
 
:::Thanks for pointing out that I could use the congruence formula to simplify (and possibly quicken up) the calculation of the digital root which is used to help establish the optimum starting value for each base. Unfortunately, I haven't been able to use it as I wasn't able to obtain consistently faster times than before. Although it was marginally faster up to base 25, it then started to diverge and by the time base 28 was reached it was 48 seconds slower than before. This may be due to the vagaries of big.Int arithmetic in Go but thanks anyway for continuing to think about this task which has been a real team effort :) --[[User:PureFox|PureFox]] ([[User talk:PureFox|talk]]) 19:50, 2 June 2019 (UTC)
9,476

edits