Talk:First perfect square in base n with n unique digits: Difference between revisions
Content added Content deleted
(Responded to comment about repeated digits from Nigel Galloway.) |
(Added comment about apparent discrepancy in results for base 21.) |
||
Line 299: | Line 299: | ||
So, at a minimum, the smallest starting value will need an extra 6 |
So, at a minimum, the smallest starting value will need an extra 6 |
||
Minimum start value: 10234566789ABCDEFGHIJK</pre> |
Minimum start value: 10234566789ABCDEFGHIJK</pre> |
||
I've just tried to run a variation of my Go program using this approach up to base 21. However, I'm getting a lower value than your Perl 6 program for base 21 itself even though I'm starting from 10234566789ABCDEFGHIJK as you are, viz: |
|||
Base 21: 4C9HE5FE27F² == 1023457DG9HI8J6B6KCEAF |
|||
compared to your: |
|||
Base 21: 4C9HE8175DA² == 1023467JKAIEHB5DF9A8CG |
|||
Unless there's something wrong with Go's big.Int routines, both numbers check out as perfect squares when I convert them to decimal so I'm at a loss to explain the difference. --[[User:PureFox|PureFox]] ([[User talk:PureFox|talk]]) 00:20, 26 May 2019 (UTC) |
|||
==Calculating quadratic residues== |
==Calculating quadratic residues== |
||
The valid digital roots can be calculated using the following code in F#: |
The valid digital roots can be calculated using the following code in F#: |