Loading ...
Sorry, an error occurred while loading the content.

Re: [PrimeNumbers] Squarerooting

Expand Messages
  • SWagler@aol.com
    In a message dated 4/3/2001 7:01:39 AM Pacific Daylight Time, ... Observed heuristically, if you sum the digits of a square recursively to a single digit, the
    Message 1 of 7 , Apr 3, 2001
    • 0 Attachment
      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]
    • Paul Leyland
      ... Indeed. It s the quadratic residue test with modulus 9. It s subsumed in the mod 63 test I gave and it s equivalent in the other proposals. Paul
      Message 2 of 7 , Apr 4, 2001
      • 0 Attachment
        > 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.

        Indeed. It's the quadratic residue test with modulus 9. It's subsumed
        in the mod 63 test I gave and it's equivalent in the other proposals.


        Paul
      Your message has been successfully submitted and would be delivered to recipients shortly.