# Perfect square sequence

In base 10, the sequence 49,4489,444889,... consists of all perfect squares.

Is this true for any other bases (greater than 10, of course)?

-
In base $b$, try looking at $\lfloor 2b^k/3 \rfloor^2$, where $\lfloor\cdot\rfloor$ is the floor function i.e. rounds numbers down to the nearest integer below. – anon Aug 3 '11 at 19:11
@anon: this series is $((2\cdot10^k+1)/3)^2$, so you should use the ceiling – Ross Millikan Aug 3 '11 at 19:32
Note, there is a post on the problem (in base $10$), here. – JavaMan Aug 3 '11 at 19:33
@Ross: You're correct, I don't know why I said floor. – anon Aug 3 '11 at 19:40
1331 is a cube in any base $b\geq 4$. – Christian Blatter Aug 3 '11 at 20:28

No, it isn't.

The $n$'th term of your sequence in base $b$, if I understand correctly, is $1 + 8 \sum_{j=0}^{n-1} b^j + 4 \sum_{j=n}^{2n-1} b^j$. Consider the case $n=1$: $a_1 = 4 b + 9$. If that is a square, say $(2k+1)^2$ (since it is odd), we have $b = ((2k+1)^2 - 9)/4 = k^2 + k - 2$.
Now taking $n=3$: $a_3 = 4\,{k}^{10}+20\,{k}^{9}+4\,{k}^{8}-104\,{k}^{7}-64\,{k}^{6}+256\,{k}^{ 5}+120\,{k}^{4}-348\,{k}^{3}-24\,{k}^{2}+216\,k-71$. Consider $q = 2\,{k}^{5}+5\,{k}^{4}-{\frac {21}{4}}\,{k}^{3}-{\frac {103}{8}}\,{k}^{ 2}+{\frac {595}{64}}\,k+{\frac {891}{128}}$ (which comes from the Laurent series of $\sqrt{a_3/k^{10}}$ at $k=\infty$). It turns out that $a_3 - q^2 < 0$ for all real $k$, while $a_3 - (q - 1/128)^2 > 0$ for $k > 567.75$. Thus if $k$ is an integer $> 567$, $\sqrt{a_3}$ is between two numbers in of the form $\frac{\text{integer}}{128}$, and in particular is not an integer. Trying values of $k$ from 2 to 567, the only one that makes $a_3$ a square is $k=3$ (corresponding to $b=10$).

-
Impressive! Thanks... – EagerLearner Aug 4 '11 at 18:39

More generally, if $b = 9 m + 1$ and $r = 4 m$, the corresponding sequence $a_n = 1 + 2 r \sum_{j=0}^{n-1} b^j + r \sum_{j=n}^{2n-1} b^j$ consists of squares, namely $a_n = \left( \frac{2(9m+1)^n+1}{3} \right)^2$.

-

$((2*19^5+1)/3^2)=2724919437289,\ \$ which converted to base $19$ is $88888GGGGH$. It doesn't work in base $13$ or $16$. In base $28$ it gives $CCCCCOOOOP$, where those are capital oh's (worth $24$).

This is because if we express $\frac{1}{9}$ in base $9a+1$, it is $0.aaaa\ldots$. So $\left (\frac{2(9a+1)^5+1}{3}\right)^2=\frac{4(9a+1)^10+4(9a+1)^5+1}{9}=$

$(4a)(4a)(4a)(4a)(4a)(4a)(8a)(8a)(8a)(8a)(8a+1)_{9a+1}$

where the parentheses represent a single digit and changing the exponent from $5$ changes the length of the strings in the obvious way.

-