In a message dated 4/3/2001 7:01:39 AM Pacific Daylight Time,

Mnemonix@... writes:

> Does anybody know of a quick test to see whether a number squareroots to

> give a whole number? sqrt() is too computationally "heavy" and I don't need

> the actual squareroot - I just need the check to see if the number

> squareroots to give a whole number.

>

Observed heuristically, if you sum the digits of a square recursively to a

single digit, the squares will sum to 1, 4, 7, or 9 only. For example 5329-->

19-->10-->1.

Also the square sums have roots with specific sums:

1 squares have roots that sum to 1 or 8

4 squares have roots that sum to 2 or 7

7 squares have roots that sum to 4 or 5

9 squares have roots that sum to 3, 6 or 9

I think this is equivalent to one of the methods shown earlier and only rules

out some numbers.

Steve Wagler

[Non-text portions of this message have been removed]