3
$\begingroup$

Let $s: \mathbb{Z}^+ \to \mathbb{Z}^+$ be the function that sends a positive integer to the sum of its digits. Is there a number $n$ such that $s(n)=10$ and $s(n^2)=100$? What I've tried so far is to write $n = 10^ma_m + ... + 10^0a_0$. I know that $\displaystyle\sum_{i=0}^m a_i = 10$ and that $\displaystyle(10^ma_m + ... + 10^0a_0)^2 = \sum_{i=0}^n 10^{2i}a_i^2 + 2\sum_{i<j}10^{i+j}a_ia_j$ but I don't really know how to deal with the powers of 10 to figure out if such number exists or not.

$\endgroup$
9
$\begingroup$

By computer search: $n=11111111101$ will work (not sure it is minimal).

Note: $n^2=123456789898765432201$.

$\endgroup$
  • $\begingroup$ you coded the problem? $\endgroup$ – john doe Sep 18 '17 at 19:31
  • 4
    $\begingroup$ @johndoe Not really. From experience with similar problems I expected there would be an answer with a lot of $1's$ so I just searched those. $\endgroup$ – lulu Sep 18 '17 at 19:32
6
$\begingroup$

$10111111111^2=102234567898987654321$ works, also.

$1111111111^2=1234567900987654321$ fails because of carries. Otherwise, the convolution of the digits would give that the sum of the digits of any $n^2$ would be the square of the sum of the digits of $n$. We just have to use small enough digits, and make some space so that carries do not come into play.

$\endgroup$
  • $\begingroup$ Interestingly, it's just the mirror image! $\endgroup$ – john doe Sep 18 '17 at 19:39
  • 1
    $\begingroup$ @johndoe: I think we can insert a $0$ anywhere within $1111111111$ to prevent the carries and get a solution. $\endgroup$ – robjohn Sep 18 '17 at 19:42
  • 1
    $\begingroup$ @robjohn Nearly. There is a carry if the zero is in the middle. $\endgroup$ – Joffan Sep 18 '17 at 19:56
  • $\begingroup$ @robjohn: Not in base six. Using that base for all numerals that follow, $1011111^2$ has the proper digital sum of $100$ (thirty-six base ten), similarly for $1101111^2, 1111011^2, 1111101^2$; but $1110111^2$ gives a digit sum of $51$ (thirty-one base ten). $\endgroup$ – Oscar Lanzi Sep 18 '17 at 19:59
  • $\begingroup$ So it seems that a $0$ in the middle fouls things up in the even bases. I'll check this when I get back and add something to my answer. $\endgroup$ – robjohn Sep 18 '17 at 20:27
0
$\begingroup$

Just for fun, $200002002000202$ also works. The square is $40000800804088804808808040804$.

$\endgroup$

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.