Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Square of an Number

  1. Sep 1, 2009 #1
    How can i prove that square of an integer ends with 0,1,4,5,6,9 ?
     
  2. jcsd
  3. Sep 1, 2009 #2
    What base is your number system in ? If it is ten then you have to show that with all ten possible endings, n squared will not give a number with a different ending.
    As another thought since n squared = -n squared in any base the maximum number of possible endings is [(B + 1)/2] where [] is the next higher integer and B is the base. In base 10 you will only need to look at numbers from 0 to 10/2 to find the possible endings since 5 to10 are the same as - (-5 to 0) mod 10.
     
    Last edited: Sep 1, 2009
  4. Sep 1, 2009 #3

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    You can write any number, in base 10, as n= 10i+ j for integers i and j with j the "last digit", from 0 to 9.
    [itex]10i+ 0= 100i^2[/itex] which ends with 0.
    [itex]10i+ 1= 100i^2 + 20i+ 1= 10(10i^2+ i)+ 1[/itex] which ends with 1.
    [itex]10i+ 2= 100i^2+ 40i+ 4= 10(10i^2+ 4i)+ 4[/itex] which ends with 4.
    [itex]10i+ 3= 100i^2+ 60i+ 9= 10(10i^2+ 6i)+ 9[/itex] which ends with 9.
    [itex]10i+ 4= 100i^2+ 80i+ 16= 10(10i^2+ 8i+ 1)+ 6[/itex] which ends with 6.
    [itex]10i+ 5= 100i^2+ 100i+ 25= 10(10i^2+ 10i+ 2)+ 5[/itex] which ends with 5.
    [itex]10i+ 6= 100i^2+ 120i+ 36= 10(10i^2+ 12i+ 3)+ 6[/itex] which ends with 6.
    [itex]10i+ 7= 100i^2+ 140i+ 49= 10(10i^2+ 14i+ 4)+ 9[/itex] which ends with 9.
    [itex]10i+ 8= 100i^2+ 160i+ 64= 10(10i^2+ 16i+ 6)+ 4[/itex] which ends with 4.
    [itex]10i+ 9= 100i^2+ 180i+ 81= 10(10i^2+ 18i+ 8)+ 1[/itex] which ends with 1.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook