A four-digit positive integer is called virtual if it has the form $\overline{abab}$, where $a$ and $b$ are digits and $a \neq 0$. For example 2020, 2121 and 2222 are virtual numbers, while 2002 and 0202 are not. Find all virtual numbers of the form $n^2+1$, for some positive integer $n$.
Problem
Source: Centroamerican 2020, problem 1
Tags: number theory, Digits
28.10.2020 23:52
This problem was weird... $n^2$ has 4 digits, which means that $30<n<100$ \begin{align*} \overline{abcb}=101(10a+b)=n^2+1\\ \iff 101(10a+b-1)=n^2-100=(n+10)(n-10) \end{align*}Then $101\mid (n+10)(n-10)$. $101$ is prime and thus $101\mid (n-10)$ or $101\mid (n+10)$. The first option is impossible because of the size of $n$. Then $101\mid (n+10)$ Again size implies $101=n+10$, which implies $n=91$ And this $n$ works because $91^2+1=8282$ Alternatively you could check all $90$ possibilities (or less if you rule out some using mods or something like that).I have the suspicion that many participants did this.
29.10.2020 01:11
How is $2021$ a virtual number? Am I misreading something?
29.10.2020 02:51
It is a typo
22.06.2022 07:05
Such a number must have the form $101(10a+b)=n^2+1$. Then note that $101$ is prime, and $101(10a+b-1)=(n-10)(n+10)$. Thus $101\mid n-10$ or $101\mid n+10$. We're just about done, just need a little bounding. We have $n^2+1=101(10a+b)\le101(10\cdot9+9)$ so $n\le98$. This means that $n$ is not big enough for $101\mid n-10$, so $101\mid n+10$. This gives $n=91$, so the answer is $\boxed{8282}$.
23.06.2022 02:59
Solved with player01 We have $1000a+100b+10a+b=n^2+1 \rightarrow 101(10a+b)=n^2+1$ We also have $n \leq 99$. Next, we can subtract $101$ from both sides, giving $101(10a+b-1)=(n-10)(n+10)$ We have $101$ prime, which gives us $2$ cases. Case 1. $101 \mid (n+10)$ This gives us $n=91$, which satisfies $n \leq 99$. This case gives the answer of $\boxed{8282}$ Case 2. $101 \mid (n-10)$ This gives us $n=111$, which doesn't $n \leq 99$. Thus, this case does not work. Therefore, the only solution is $\boxed{8282}$. $\blacksquare$
09.07.2022 16:38
The answer is $8282$. It's clear that $$n^2 + 1 = \overline{abab} = 1010a + 101b = 101(10a + b)$$which implies $$n^2 + 1 \equiv 0 \pmod{101}$$or $$(n + 10)(n - 10) \equiv 0 \pmod{101}.$$Because $101$ is prime, we know $$n \equiv 10, 91 \pmod{101}$$must hold. Now, since $n^2 + 1$ must be a four-digit positive integer, it suffices to just test $n = 91$ by size. Indeed, $91^2 + 1 = 8282$ works, so we're done. $\blacksquare$ Remark: The solution to this problem is very straightforward.