Prove that an integer with digits '1' is not a perfect square.

  • Context: Graduate 
  • Thread starter Thread starter futb0l
  • Start date Start date
  • Tags Tags
    Integer Square
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
39 replies · 19K views
If you work out p(mod 12) for p a prime, what are the possibilities? Excepting 2 and 3. What does this imply for p^2(mod 12)?
 
Physics news on Phys.org
Hi all,

I think I have found another proof on futbol's problem. I'm grateful if anyone could check it:

Proof by contradiction

Suppose there exists an integer x such that x^2 = 111...11.
x must be an odd integer because an even x can't have the ending digit 1.
Let's write x in the form x=2k+1 where k is an integer number.

Thus,
x^2 = 111...11
=> (2k+1)^2 = 111...11
=> 4k^2 + 4k + 1 = 111...11
=> 4k^2 + 4k = 111...10
=> 4k^2 + 4k = 111...1 * 10
=> 4k(k+1) = 111...1 * 10
=> 2 k(k+1) = 111...1 *5
=> 2 k(k+1) = 555...5

The left hand side is an even number and the right hand side an odd number
which is a contradiction. Therefore there exists no integer x such that
x^2 = 111...11.
 
Dick said:
If you work out p(mod 12) for p a prime, what are the possibilities? Excepting 2 and 3. What does this imply for p^2(mod 12)?

Hi Dick,

The problem stated that p is a prime number that is greater than 3. When you work out p^2(mod 12) you get a remainder of 1 for every prime number square that is greater than 3. This is not the case with 2 or 3. I was wondering if there was some proof behind this.
 
A more advanced problem deals with when a REPUNIT is prime. This happens for 2, which is 11. Now since we can use the form [tex]\frac{10^n-1}{9}[/tex], it is clear that for n=ab, that 10^a-1 is a factor. (And if n is greater than 1, this divides out more than just the 9.) So that looking for primes we only need consider repunits of prime length 2,3,5,7...etc.

What is the next prime repunit after 11? Well, my TI-89 will handle the case for n=17 and finds it not prime with smallest factor of 2071723. Checking with Wolfram under repunits, I see that n=19 is the smallest case after n=2, which gives us a prime.

Of course, the whole matter can be generalized and examined for bases other than 10, as Wolfram indicates. A Mersenne number is the famous case of base 2.
 
Last edited:
mikeyflex said:
Hi Dick,

The problem stated that p is a prime number that is greater than 3. When you work out p^2(mod 12) you get a remainder of 1 for every prime number square that is greater than 3. This is not the case with 2 or 3. I was wondering if there was some proof behind this.

A direct way to see this is that p(mod 12) can only be 1,5,7 or 11. Otherwise it is divisible by 2 or 3. But 1^2, 5^2, 7^2 and 11^2 are all equal to 1 mod 12. This is what matt was alluding to when he said all primes are equal to +1 or -1 mod 6.
 
matt grime said:
For mikeyflex: every prime not equal to 2 or 3 is of the form 6m+1 or 6m-1 for some integer m. This completely explains your observation.

Thanks Matt,

The problem stated that when p is a prime greater than 3, to evaluate p^2 mod 12.

When you plug in prime values for p^2 mod 12 you get 1, which is an equivalence relation. Is there any significance to this problem as pertaining to a proof of sorts?

Thanks again Matt
 
to explain what matt's saying much farther than what needs to be done:
every prime greater than 3 can be written as 6k +1 or 6k -1 (which can be shown easily by a proof by cases).

(6k+1)^2 = 36k^2 + 12k + 1 = 12(3k^2 + k) + 1 = 1mod12
(6k - 1)^2 = 36k^2 -12k +1 = 12(3k^2 - k) + 1 = 1mod12

that's really all the "significance" involved in the observation
 
matticus said:
to explain what matt's saying much farther than what needs to be done:
every prime greater than 3 can be written as 6k +1 or 6k -1 (which can be shown easily by a proof by cases).

(6k+1)^2 = 36k^2 + 12k + 1 = 12(3k^2 + k) + 1 = 1mod12
(6k - 1)^2 = 36k^2 -12k +1 = 12(3k^2 - k) + 1 = 1mod12

that's really all the "significance" involved in the observation


Ahh, now I get it, and that must be the reason why this proof doesn't work for prime numbers 2 and 3. Thank you for the observation. Number theory never seems light the bulb for me.