25

We know that $12^2 = 144$ and that $38^2 = 1444$. Are there any other perfect squares in the form of $\frac{13}{9} (10^n - 1) + 1$ (i.e. $1$ followed by $n$ $4$'s), and how would we prove it?

J. W. Tanner
  • 63,683
  • 4
  • 43
  • 88
Joe Z.
  • 6,739
  • 5
    Seems you forgot to add $1$? – MonkeyKing Apr 12 '15 at 06:33
  • Oh, yes, I suppose I did. – Joe Z. Apr 12 '15 at 06:35
  • $$(10m\pm2)^2=100m^2\pm40m+4$$

    We need $100m^2\pm40m+4=\dfrac{13(10^n-1)}9+1$

    $$900m^2\pm360m+40=10^n$$

    $$90m^2\pm36m+4=13\cdot10^{n-1}$$

    – lab bhattacharjee Apr 12 '15 at 06:49
  • 1
    I would first ask whether it is possible for a square to end in 4444. If the answer is no, then you win. – Gerry Myerson Apr 12 '15 at 07:07
  • @GerryMyerson: Hmm, that is true. I forgot to think about it that way. – Joe Z. Apr 12 '15 at 07:08
  • @ADG: Your code wouldn't detect a perfect square even if it existed, since it relies on a floating-point data type. – Joe Z. Apr 12 '15 at 07:11
  • Your code could be correct by coincidence. There could be any number of reasons why someone downvoted your answer (wasn't me, by the way). I think it's impossible to "undownvote" until/unless an answer has been edited. – Gerry Myerson Apr 12 '15 at 07:11
  • I see what you have posted, @ADG. I'm not in a position to assess it, and, anyway, since we have a proof that goes beyond any number of crore, I don't really see the point. – Gerry Myerson Apr 12 '15 at 07:21
  • I wouldn't want to disappoint you, @ADG, though I really don't know why you would want my opinion of some lines of computer code. I don't even know what language its written in --- that's how much I know about computing. – Gerry Myerson Apr 12 '15 at 07:24
  • 2
    @GerryMyerson: One can easily check by brute force that 4444 is not a perfect square mod 10000, so no perfect square can end in 4444. The answer described by user128776 is much more elegant, though. – Nate Eldredge Apr 12 '15 at 19:03
  • @Nate, true, but there are ways, other than brute force, to show that $4444$ is not a square modulo $10000$. – Gerry Myerson Apr 13 '15 at 00:25

3 Answers3

38

144...4 is divisible by 4 hence it follows that 144...4 is a perfect square when 3611...1 is also a perfect square.

36 and 361 are special cases because others can be written by following

3611....111 = 4(25$m$ + 2) + 3 where $m$ is in $Z$

Consider the proof in the following question:

Proving that none of these elements 11, 111, 1111, 11111...can be a perfect square

Therefore, 3611...1 can not be a perfect square.

user128766
  • 1,065
7

Brute force answer:

If $x^2 = 1\cdots4444$ then we can consider this mod $10000$ to see that we must have $x^2 \equiv 4444 \pmod{10000}$. To see if such $x$ exists, it is sufficient to consider $0 \le x < 10000$. The following C program terminates with no output, showing that no such $x$ exists.

#include <stdio.h>

int main(void) {
  int x;
  for (x = 0; x < 10000; x++) {
    if ((x * x) % 10000 == 4444) {
      printf("%d\n", x);
    }
  }
  return 0;
}

Note that you should run this on a system where int is at least 32 bits.

Nate Eldredge
  • 101,664
1

There are no more. No perfect square can end in $4444$ because this fails $\bmod 16$.

A number represented in base ten is congruent to its last four digits $\bmod 16$. So a number ending with four fours is congruent with $12\bmod 16$. But all squares are $\in\{0,1\}\bmod4$, and multiplying by $4$ to get an even square must then give a number $\in\{0,4\}\bmod16$. $\rightarrow\leftarrow$

In fact no square ends with four identical digits in base ten unless the quadruple terminal digit is $0$.

Oscar Lanzi
  • 48,208