1

How to prove for any prime $$p \neq \{2,7\}, \exists n \text{ s.t. }p \mid n$$ where n is a number that consists only of 1s in octal base.

I started off but need some direction. I thought of using $$ 8^{p-1} - 1 \text{ (mod p)} $$

and that $$ 8^{p-1} - 1 $$ given $(p-1)$ number of 7s in octal form; and that this divided by 7 is all 1s in octal form.

J. W. Tanner
  • 60,406
15150776
  • 137

1 Answers1

1

You’re on the right track. By Fermat’s little theorem, $8^{p-1}\equiv1\pmod p$ for prime $p\ne2$, so $p\mid8^{p-1}-1$. Furthermore, $7\mid8^{p-1}-1,$ since $8\equiv1\pmod7$. Say $8^{p-1}-1=7k$. Then $p\mid7k$, and $p\ne7$ means $p\mid k=\dfrac{8^{p-1}-1}7=\dfrac{\sum\limits_{i=0}^{p-2} 7\times8^i}7=\sum\limits_{I=0}^{p-2}8^i$, which is a string of $1$s in octal notation.

J. W. Tanner
  • 60,406