Except for $1$, are there any perfect powers in the sequence $1,21,321,4321,\cdots$?

This is sequence OEIS A000422, the concatenation of positive integers from $n$ down to $1$.

If there is any perfect square in the sequence, $n$ must be equal to $1\pmod{3}$, as when $n\equiv1\pmod{3}$, then the number is equal to $1\pmod{3}$,which can be a perfect square and also possibly a perfect cube.

If $n\cdots4321$ is divisible by $9$, then $n$ is equal to $8\pmod{9}$ in order to be a perfect square.

In case $n\cdots4321$ is divisible by $27$, then $n$ is equal to $26\pmod{27}$ in order to be a perfect cube.

I don’t know about higher odd prime perfect powers.

The only sure thing is that any number(except $1$) in OEIS A000422 is never a perfect 5th power, due to the fact that $21$ isn’t a fifth power residue $\pmod{100}$.

Also, the only possibilities that $n\cdots4321$ is a perfect power is that either $n\equiv1\pmod{3}$, $n\equiv8\pmod{9}$, or $n\equiv26\pmod{27}$.

I tried to used Pari GP to check if there is any perfect power in the sequence other than $1$, but so far, I didn’t find one.

  • $\begingroup$ @lulu oh right my bad $\endgroup$
    – acat3
    Jan 10 at 13:32
  • 2
    $\begingroup$ For $n\le 10^4$ , there is no perfect power. $\endgroup$
    – Peter
    Jan 10 at 14:54
  • $\begingroup$ You have edited this post, so is there any connection? Do you know whether any perfect square $b^2>1$ is of this form, or not? $\endgroup$ Jan 10 at 19:32

1 Answer 1


There are no squares in the sequence because $10987654321$ (the $10$th entry in the sequence) is not a square mod $10^{11}$, and the first $10$ entries are not squares (except $1$). Since the residues modulo $10^{11}$ are all the same after this, there cannot be a square in the sequence.

There are also no fifth powers since $21$ is not a fifth power mod $100$.

This style of proof will not show that there are not $p$th powers in the sequence for $p$ coprime to $10$, I'm afraid. This is because Hensel's lemma implies that an integer ending in $1$ is a $p$th power mod $10^n$ for any $n$ and $p$ coprime to $10$.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .