We define $I(n)$ as the result when the digits of $n$ are reversed. For example, $I(123)=321$, $I(2008)=8002$. Find all integers $n$, $1\leq{n}\leq10000$ for which $I(n)=\lceil{\frac{n}{2}}\rceil$. Note: $\lceil{x}\rceil$ denotes the smallest integer greater than or equal to $x$. For example, $\lceil{2.1}\rceil=3$, $\lceil{3.9}\rceil=4$, $\lceil{7}\rceil=7$.
Problem
Source: Cono Sur 2008 #1
Tags: number theory, cono sur
18.11.2015 00:20
There is a unique solution which is 7993. Suppose that $$n=1000a+100b+10c+d$$Where $a,b,c,d$ are digitis less than 10. Now we can write : $$I(n)=1000d+100c+10b+a=\lceil{\frac{1000a+100b+10c+d}{2}}\rceil$$which is equivalent to : $$1000d+100c+10b+a=500a+50b+5c+\lceil{\frac{d}{2}}\rceil$$Or : $$1000d+95c-40b-500a=\lceil{d/2}\rceil -a$$Thus we must have $a\equiv \lceil{d/2}\rceil mod 5$. Since LHS is divisible by 5. So we will consider some cases : Case 1 : $a=9\implies \lceil{d/2}\rceil =4\implies d\in \{7,6\}$ since $d\le 9$. The equation becomes : $$1000d+95c-40b-4500=-5$$Or $200d+19c-8b=900-1=899$. But we have $d\ge 6$ and $19c-8b\ge -9.8=-72$, thus LHS is greater than or equal to $1200-72\ge 900$. Contradiction. In the same way (using some inequalities) we can conclude that there are no solution in the cases $a\in \{6,8\}$. Now suppose that $a=7$ this means that $\lceil{d/2}\rceil=2$ or $d\in \{3,4\}$. The equation equivalent (after dividing both sides by 5) to : $$200d+19c-8b=700-1=699$$$d$ cannot be 4 since LHS will be greater than RHS so it must be 3. So : $$19c-8b=99$$Taking this modulo 19 we get that $19|2b+1$ which implies to the unique solution. I will post the solution to the cases $a\le 5$ later.
18.11.2015 00:46
Suppose that $a\le 5$ so we must have $\lceil{d/2}\rceil = a$ so the equation will be : $$1000d+100c+10b+a=500a+50b+5c+a$$or (after dividing by 5) : $$200d+19c=100a+8b$$Use now the inequality $a\le \frac{d+1}{2}$ to get the inequality : $$200d+19c\le 50d +50+8b$$or $$150d+19c\le 50+8b \le 50+8.9=121$$thus we must have $d=0$ and $a=0$. Now rewrite the equation after putting $a=d=0$ to get : $$19c=8b \implies 19|b \implies b=0 \implies c=0$$but this gives us $n=0$ which is not a solution. This complete my solution. Remark : I have written $n$ as a four digit number from the asumption in the problem $n\le 10^4$.
18.11.2015 02:36
You're missing 3 solutions. Note that if $n$ is a 3 digit number and $n=100a+10b+c$, then $I(n)=100c+10b+a$, not $1000c+100b+10a+0$ as your solution would imply.
18.11.2015 03:46
Really sorry about that. But my solution gives a method for doing the other three cases
12.01.2019 18:35
The other solutions are $1$, $73$ and $793$.