Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is $10^n+1$ composite for all $n\in \mathbb{N}$ greater then $2$?

I tried many values of $n$, and $10^n+1$ is composite each time (excpet $n=1,2$).

Is my conjecture correct? Thank you.

share|cite|improve this question
According to this it is an open question. – WimC Dec 15 '12 at 7:53
101 appears to always divide the result when $n \equiv 2(\mod 4)$ – orlandpm Dec 15 '12 at 7:57
@orlandpm: Yes, because $10^{4n+2}=100^{2n+1}\equiv (-1)^{2n+1}\pmod{101}\equiv -1\pmod{101}$. – Jonas Meyer Dec 15 '12 at 7:59
For odd values of $n$, $11|10^n+1$. – Mike Dec 15 '12 at 8:01
up vote 8 down vote accepted

If $n = 2^l m$ where m is odd, then $$\displaystyle (10^{2^l})^m + 1 \equiv 0 \bmod (10^{2^l} + 1)$$.

So the interesting question is if $10^n + 1$ is composite when $n$ is a power of $2$.

Unfortunately I don't know what happens when $n$ is a power of $2$.

share|cite|improve this answer
Heuristically they are probably all composite. WolframAlpha can verify them all up to $10^{2048}+1$. – Dan Brumleve Dec 15 '12 at 8:12
The proof given in the link can be adapted to $10^{2^n}$ case too. So you are right. However I cant seem to understand in what sense it is a good heuristic... Thanks for that link :) – Isomorphism Dec 15 '12 at 8:18
The heuristic is the prime number theorem which basically says that the probability that $n$ is prime is $\frac{1}{\log{n}}$. So when $n=10^{2^x}+1$ and we sum over all $x \gt 11$ this series converges. – Dan Brumleve Dec 15 '12 at 8:22
Note that this is the exact analogue of the question of when $2^n+1$ is prime: then also $n$ must itself be a power of two, leading to the "Fermat primes". – Greg Martin Dec 15 '12 at 10:23
@DanBrumleve: the fact that the series converges predicts that there are only finitely many such primes. The fact that the series (starting at x=11) is very small suggests that there are none. – Greg Martin Dec 15 '12 at 10:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.