34

For what values of $x$ is the number $121$ a square in base $x$?

This is a very easy question, but I still think it's pretty fun. Perhaps it's something to pass on to younger people who are taking algebra.

blakeoft
  • 1,519
  • 11
  • 13

2 Answers2

35

All of them (except base $2$ which can't have $121$.)

Added pedantry:

If you're ok with negative bases, the answer is all positive and negative bases except $-2$, $-1$, and $2$. Base $0$ and $1$ make no sense at all to me (and $-1$ very little) so I would also claim it doesn't hold for these, mostly because "holding" isn't really provably true or false, but also because 121 is not a valid number in those bases, as also it is not valid in base 2 and -2.

Also, I am considering integer bases only.

Why is it a square for these bases?

For whatever base $n$ you're working in, simply expanding the number $121$, it means $n^2 + 2n + 1$. And that is $(n+1)^2$ as a matter of algebra. And that is a square.

Kate Gregory
  • 5,760
  • 1
  • 26
  • 34
  • Base-1 excluded as well! – leoll2 Apr 22 '15 at 14:52
  • What about negative values of x? – blakeoft Apr 22 '15 at 14:54
  • 121 base minus 10 (ignoring any scruples about what a negative base even means) is 100 + (-20) + 1 which is 81, which is 9^2. So it doesn't seem to be an issue for bases -3 and lower. – Kate Gregory Apr 22 '15 at 15:07
  • Check negative bases with this Python snippet. For example, try negabase(4, 3) on the right-hand console (after running the snippet, of course). – Ian MacDonald Apr 22 '15 at 15:11
  • 1
    @blakeoft For negative values of x, let n = abs(x). The formula is now n^2 - 2n + 1 which reduces to (n-1)^2 so the value will still be a square if x < -2. Therefore, the complete answer is Integers <-2 and > 2 – Engineer Toast Apr 22 '15 at 15:15
  • If with "a square" it is meant that it is a square of an integer, is x should be restricted to integers, as @EngineerToast mentioned. In base Pi, $121_{\pi}=(1+\pi)^2$, which is not a square of an integer. –  Apr 23 '15 at 08:08
  • @EngineerToast You missed base $2i$. As far as I can see the complete answer is all bases that are Gaussian Integers and have 1 and 2 as digits. – Taemyr Apr 23 '15 at 10:25
  • As far as I know base 1 is actually quite simple: a number is just represented by as many characters as its value: 2 will be 11, 3 will be 111 and so on. 121 still can't exist in base 1 so of course it is impossible for it to be square in base 1. – meneldal Apr 24 '15 at 05:11
  • I think it's square in base-1: $121_1 = 1\times1^2+2\times1^1+1\times1^0=4$. – Ypnypn Apr 24 '15 at 05:15
  • 1
    @meneldal The strange thing to me is that 121 doesn't exist in base 1 presumably because of the "2", but simultaneously the instances of "1" are ok. To be more specific, $n$ is not usually a legal symbol when writing a number in base $n$. I guess base 1 is an exception. – blakeoft Apr 24 '15 at 12:34
  • @blakeoft you can use any symbol for base 1, it is just more common to use 1 instead of 0. I also believe not everyone agrees on this definition but for example Paul Graham joked about using this "base1" using lists to represent integers in lisp/Arc. – meneldal Apr 24 '15 at 13:22
  • I've always used 0 for base 1. My idea is that in base n, any number composed of digits that are individually less than n (closer to 0 than n, I had not heard of negative bases), was a valid number in base n. – vero Jun 22 '15 at 04:20
  • You can use any digit in any base. There's nothing wrong with writing $121$ in base $2$, it's simply $1\cdot2^2 + 2\cdot2^1 + 1\cdot2^0 = 9$, so also a square. On the other hand, I agree that bases $0,\pm1$ are ill-defined; the standard condition is that the base $\beta$ satisfies $|\beta|>1$. – yo' Sep 16 '17 at 20:02
  • Base 1, also called unary or tally marks, is usually bijective, where the symbols goes from 1 to n, not 0 to n-1, precisely because using 0 doesn't make much sense in this case. – No Name Mar 15 '23 at 17:17
22

The base-$x$ number $121$ is a square

whenever $x\geq 3$.

For $x\geq 3$, we can multiply in base $x$: \begin{array}{ccc}&1&1\\\times&1&1\\\hline&1&1\\1&1&\\\hline1&2&1\end{array}We never needed to "carry", so this computation looks the same for every $x$.

Julian Rosen
  • 14,256
  • 1
  • 51
  • 93