I like to build math problems; to solve the one below I should first find a certain square and use it in my solution. I would want to know if anyone can solve this problem otherwise. Thanks.

Problem. Prove that there are infinitely many natural numbers whose decimal notations end with 2015 and whose squares begin with 2015; in other words, numbers $x$ that satisfy

$$x = a_na_{n-1}......2015$$

$$x^2 = 2015b_{m-4}b_{m-5}.....b_2b_1b_0$$

  • $\begingroup$ Reformulating your question: Find integrs $x$ and $y$ such that $\endgroup$ – P Vanchinathan May 22 '15 at 1:03
  • 2
    $\begingroup$ $44890\dots02015^2 = 201511\dots$ $\endgroup$ – JMoravitz May 22 '15 at 1:07
  • $\begingroup$ Please tell how do you found this partial response. $\endgroup$ – Piquito May 22 '15 at 1:12
  • 3
    $\begingroup$ $\sqrt{2015}=44.888751\dots$, so $4489$ will do (for a beginning of $x$, I mean). Indeed, $4489^2=20151121$ $\endgroup$ – Alexey Burdin May 22 '15 at 1:14
  • $\begingroup$ Added a full proof of my claim (and defined my answer more rigorously). There are of course other answers too, instead of 4489000002015, you could change some of the center zeroes around some. Perhaps more interesting would be trying to prove that every natural number 448900...002015<x<4489899...992015 has this property. (4489992015^2 begins with 2016 unfortunately) $\endgroup$ – JMoravitz May 22 '15 at 1:39

Claim: $2015\cdot 10^{2k+4}<(4489\cdot 10^k + 2015)^2 <2016\cdot 10^{2k+4}$ for all $k\geq 4$

You have: $(4489\cdot 10^k + 2015)^2 = 4489^2\cdot 10^{2k} + 2\cdot 2015\cdot 4489\cdot 10^k + 2015^2$

Trivially $2015\cdot 10^{2k+4} = 20150000\cdot 10^{2k} < 20151129\cdot 10^{2k} = 4489^2\cdot 10^{2k} < (4489\cdot 10^k+2015)^2$


$2\cdot 2015\cdot 4489\cdot 10^k + 2015^2 \leq 2\cdot2015\cdot 4489\cdot 10^k + 2015^2\cdot 10^{k-4}= 180910760225\cdot 10^{k-4}=1809.10760225\cdot 10^{k+4}\leq 1809.10760225\cdot 10^{2k}<1810\cdot 10^{2k}$


$(4489\cdot 10^k + 2015)^2 \leq 20151129\cdot 10^{2k} + 2\cdot 2015\cdot 4489\cdot 10^k + 2015^2 < 20151129\cdot 10^{2k} + 1810\cdot 10^{2k} = 20152939\cdot 10^{2k} < 2016\cdot 10^{2k+4}$

Thus the claim is proven that for every $k\geq 4$ you have $2015\cdot 10^{2k+4}<(4489\cdot 10^k + 2015)^2 <2016\cdot 10^{2k+4}$.

Notice finally that means that $4489\cdot 10^k+2015$ ends with the digits $2015$, and its square begins with the digits $2015$. Since this is true for every $k\geq 4$, it is true for infinitely many such natural numbers.


Let $x=44890\cdots02015$, with any number of zeros in the middle (even none at all). Then $$44890\times10^d<x<44893\times10^d$$ for some $d$, so $$2015112100\times10^{2d}<x^2<2015381449\times10^{2d}\ .$$ Therefore $$2015\times10^{2d+6}<x^2<2016\times10^{2d+6}\ .$$ Thus $x^2$ is a $(2d+10)$-digit number beginning with the digits $2015$.


Reduced the search with some intelligent pattern and found by programming that for $x = 141982015$ its square is $20158892583460225$

Write your $x=10000q+2015$. Then $x^2= 10^8q^2 + 2q.10^4+ 2015^2$ As we are only interested only in the initial digits being 2015, we ignore the last 4 digits of $2015^2$ getting 406 (from 4060225). The terminal 4 digits of the first two terms are zeros. SO we have to look for $q$ such that $10000q^2+2q+406$. starts with $2015$ If the leading decimal digit of $q>1$ then it will start with 4 or more and can be ignored.

If the leading two digits are 15 are higher the answer will start with 225 are more.

Here is the Python code:

from sys import argv

st = int(argv[1])

ed = int(argv[2])

for q in range(st,ed):

xx=10000*q*q +2*q+406

print q, " ---> ", xx


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.