Talk:Steady squares: Difference between revisions

→‎Reduce search range by observation of the results: Added syntaxhighlight tag on pascal code snippet.
m (Thundergnat moved page Talk:Steady Squares to Talk:Steady squares: capitalization policy)
(→‎Reduce search range by observation of the results: Added syntaxhighlight tag on pascal code snippet.)
 
Line 4:
And there comes the solution:By prepending a digit to n, than n*n must end in n to be a steady square.<BR>
So only solutions of one digit before can be solutions.
<langsyntaxhighlight lang="pascal">
function CalcSquare(n:LongInt;Pot10:byte);
//pot10 is 10^(count of digits of n -1)
Line 20:
// so n*n must end in n, to be a steady square
end;
</syntaxhighlight>
</lang>
 
:Note also that it must end in 1,5 or 6 (not 0 as any number ending in 0 squared ends with twice as many zeros).--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 12:46, 21 December 2021 (UTC)