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

(→‎Proof: Actually, maybe I _can_ prove it.)
Line 114:
 
A Python sketch FWIW, of a function from a given base and number to a repeated digit sum as an integer.
(For bases above 10 course, you will also need a `digit` function from the sum to a digit chararactercharacter)
 
<lang python># repSum :: Int -> Int -> Int
Line 153:
return v
return lambda f: lambda x: go(f, x)</lang>
 
The first pattern that jumps to the eye, after the self-evidences of bases 2 and 3, is that:
# The digit sum cycles for a given base are symmetric – a series of digits is repeatedly followed by its reflection.
# Where there is a single cycle of reflection/symmetry, and only one digit that is repeatedly flanked by twin siblings, that digit will also be the repeated digit sum of the first digit-saturating perfect square (square that needs all digits in the base) that we encounter.
# The picture is subtler or more obscure in the rarer cases where there are multiple symmetries in the digit sum cycle – more than one digit which is repeatedly flanked by identical twins. Such is, perhaps not accidentally, the case of '''base 13''', which is also consuming the most processor time here. (For base 13, we repeatedly see both '1', 'c', '1', and '4', '9', '4', and the first digit-saturation that we (eventually) find occurs at a point where the digit sum is 1 ...
 
Any conjectures ? [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 17:40, 23 May 2019 (UTC)
9,655

edits