1

Recently, in high-school competition maths, I came across such a question:

Does there exist an integer $n$, with $2000$ factors, such that $n$ divides $2^n+1$, or:

$$n\mid{2^n+1}?$$ This question is tagged as a practice question for number theory and is part of a lecture on indefinite equations. The solution was not provided, and I could not seem to figure it out.

Any help would be much appreciated.

Bernard
  • 175,478

1 Answers1

3

A useful lemma is that for all $k$ we have $$3^k\,|\,2^{3^k}+1$$

The proof is a straight forward induction, and may be found, e.g., here. Indeed, one can show a slightly stronger result than we require.

These are not all the $n$ such that $n\,|\,2^n+1$ but they suffice to answer this question, since $3^k$ has $k+1$ divisors.

Worth remarking: the $n$ for which $n\,|\,2^n+1$ which are not powers of $3$ form a rather erratic list. in OEIS they form sequence A016057.

lulu
  • 70,402
  • $3^k$ has $k+1$ divisors, not prime divisors right? – AgentS Nov 08 '19 at 13:38
  • 1
    @pooja Yes. Clearly $3^k$ has only one prime divisor. – lulu Nov 08 '19 at 13:39
  • Ah ok you're right! I was looking at another sol'n where it asked for $n$ to have $2000$ distinct prime factors haha – AgentS Nov 08 '19 at 13:40
  • this variation of the problem looks hard. 3rd page last line – AgentS Nov 08 '19 at 13:42
  • @pooja Yeah, that's clearly a lot harder. – lulu Nov 08 '19 at 13:49
  • How do you know theorems like this – Aarony Jamesys Nov 08 '19 at 13:52
  • @AaronyJamesys Lots of experience playing with factoring problems and such. In this particular case, numerical examples should tell you that powers of $3$ come up a lot...that should lead you to this result. – lulu Nov 08 '19 at 14:24
  • @lulu so if you didn't know the theorem, would you just have to test every number? – Aarony Jamesys Nov 08 '19 at 14:26
  • Well...numerical examples are a huge part of number theory. I'd always start by trying to list a bunch of examples. See if I can spot a pattern. Here, for instance, one should quickly see, empirically, that all "good" $n$ are divisible by $3$. Try to prove that! What about divisibility by $9$? – lulu Nov 08 '19 at 14:29