Kaprekar numbers: Difference between revisions

Line 3,020:
=={{header|Maple}}==
<lang Maple>
For a number x to be Kaprekar, it must have x^2 congruent to x mod 9. Which is only achievable when x has remainder 1 or 0 mod 9. So we only check for these cases.
Which is only achievable when x has remainder 1 or 0 mod 9. So we only check for these cases.
 
isKaprekar := proc(n::posint)
Anonymous user