Find all positive integers $N$ that are perfect squares and their decimal representation consists of $n$ digits equal to 2 and one digit equal to 5, where $n$ takes positive integer values.
Problem
Source: Greece National Olympiad 2023, Problem 2
Tags: number theory
19.02.2023 17:31
$(x+5)(x-5) = 2^{n+1} \cdot 5^{n}$ easily solvable as $gcd(x+5,x-5) = gcd(x+5,10) = 2,5,10$ and then easy bounding.
19.02.2023 18:07
straight wrote: $(x+5)(x-5) = 2^{n+1} \cdot 5^{n}$ easily solvable as $gcd(x+5,x-5) = gcd(x+5,10) = 2,5$ and then easy bounding. It turns out that $gcd(x - 5 , x + 5) = 10$ in this case though
20.02.2023 00:11
JustARandomGuy__ wrote: straight wrote: $(x+5)(x-5) = 2^{n+1} \cdot 5^{n}$ easily solvable as $gcd(x+5,x-5) = gcd(x+5,10) = 2,5$ and then easy bounding. It turns out that $gcd(x - 5 , x + 5) = 10$ in this case though Typing mistake, but yes it is obviously 10; just write $x+5 = 2 \cdot 5^{n-1}$ and $x-5 = 2^n \cdot 5$ or $x+5 = 2^n \cdot 5$ and $x-5 = 2 \cdot 5^{n-1}$ so two cases: $10 = 2 \cdot 5^{n-1} - 2^n \cdot 5$ or $10 = 2^n \cdot 5 - 2 \cdot 5^{n-1}$ which give $5^{n-2} - 2^{n-1} = 1$ so $n=3$, or $2^{n-1} - 5^{n-2} = 1$ so $n=2$ then you find $x$ and answer is $3x$ and u get $N=25$ and $N=225$
02.03.2023 13:57
euclides05 wrote: Find all positive integers $N$ that are perfect squares and their decimal representation consists of $n$ digits equal to 2 and one digit equal to 5, where $n$ takes positive integer values. Let $N=22\cdots 25$, the number of ${}2$ is ${}n+1$, where $n\geq 0$. Then $N=\frac{2(10^{n+1}-1)}{9}\times 10+5=\frac{20\times 10^{n+1}-20+45}{9}=\frac{2\times 10^{n+2}+25}{9}=\frac{25}{9}(8\times 10^n+1)$ is a perfect square. Therefore $8\times 10^n+1$ is a perfect square. Let $8\times 10^n+1=k^2$, $k\in\mathbb N^+$. Then $2^{n+3}\times 5^n=k^2-1=(k-1)(k+1)$. As $\gcd (k+1, k-1) = 1/2$, So $5^n |k-1$ or $5^n|k+1$ which is not true when $n\geq 5$. Try $n=0,1,2,3$ and we can get only $N=25$ and $N=225$ satisfy.$\blacksquare$
29.10.2023 15:31
EthanWYX2009 wrote: euclides05 wrote: which is not true when $n\geq 5$. Try $n=0,1,2,3$ and we can get only $N=25$ and $N=225$ satisfy.$\blacksquare$ Why is it not true when $$n \geq 5$$? I don't quite understand why neither term is divisible when this bound is exceeded?