Talk:First perfect square in base n with n unique digits: Difference between revisions
Content added Content deleted
(→Space compression and proof ?: Added Python sketch of repeated digit sum function) |
Thundergnat (talk | contribs) (→Proof: Actually, maybe I _can_ prove it.) |
||
Line 33: | Line 33: | ||
:Interesting in the abstract but not very useful. (I suppose the smallest such numbers aren't very useful either but... <shrug>) --[[User:Thundergnat|Thundergnat]] ([[User talk:Thundergnat|talk]]) 23:36, 22 May 2019 (UTC) |
:Interesting in the abstract but not very useful. (I suppose the smallest such numbers aren't very useful either but... <shrug>) --[[User:Thundergnat|Thundergnat]] ([[User talk:Thundergnat|talk]]) 23:36, 22 May 2019 (UTC) |
||
::Actually, after a tiny bit of thought, I think I '''can''' prove it. |
|||
::Base 2: Proof by demonstration. 10² == 100 |
|||
::Base N > 2: Concatenate the digits 1 to N-1, two zeros, then N zeros. Find the integer ceiling of the square root and square it. The resulting number will always start with the digits 1 to N-1 and zero. It almost definitely won't be the ''smallest'' such number but it proves that at least one number exists for any N. --[[User:Thundergnat|Thundergnat]] ([[User talk:Thundergnat|talk]]) 14:31, 23 May 2019 (UTC) |
|||
==any ideas of optimizations ?== |
==any ideas of optimizations ?== |
||
The main runtime for bases 2..16 ( 99% ) is used to find the one for base 13.<BR> |
The main runtime for bases 2..16 ( 99% ) is used to find the one for base 13.<BR> |