Since it is obviously not an infinite sequence of primes, it should be fastest to check the first few terms.

\[9997 = 13\times 769\]

Edit 1: By Fermat's Little Theorem, if \(9997\) is prime, then \[2^{9997} \equiv 2\ (\text{mod } 9997).\] But
\[2^{9997} \text{ mod } 9997 = 8192.\]
You can check this with an exponential expansion of \(2^{9997},\) or with Euler's theorem; both are tedious. In the words of Fermat himself, I would provide the proof, if I were not afraid to be too long.

Edit 2: the note now asks for the tenth composite in the sequence; I have a Java solution which shows it to be \(9999999999997\) (term \(13\), implying there are at least \(9\) more consecutive composites after the first) but proving this seems extremely tedious as I am only familiar with FLT and Euler's theorem. Does anyone have an idea? I know there is at least one more prime in the sequence, for example term \(17.\)
–
Caleb Townsend
·
1 year, 10 months ago

## Comments

Sort by:

TopNewestSince it is obviously not an infinite sequence of primes, it should be fastest to check the first few terms.

\[9997 = 13\times 769\]

Edit 1: By Fermat's Little Theorem, if \(9997\) is prime, then \[2^{9997} \equiv 2\ (\text{mod } 9997).\] But \[2^{9997} \text{ mod } 9997 = 8192.\] You can check this with an exponential expansion of \(2^{9997},\) or with Euler's theorem; both are tedious. In the words of Fermat himself, I would provide the proof, if I were not afraid to be too long.

Edit 2: the note now asks for the tenth composite in the sequence; I have a Java solution which shows it to be \(9999999999997\) (term \(13\), implying there are at least \(9\) more consecutive composites after the first) but proving this seems extremely tedious as I am only familiar with FLT and Euler's theorem. Does anyone have an idea? I know there is at least one more prime in the sequence, for example term \(17.\) – Caleb Townsend · 1 year, 10 months ago

Log in to reply

– Yogesh Verma · 1 year, 10 months ago

By inspection?Log in to reply

– Caleb Townsend · 1 year, 10 months ago

Yes, it is by far the fastest way to solve this problem, but I have added a FLT solution.Log in to reply

Note edited, sorry. – Bryan Lee Shi Yang · 1 year, 10 months ago

Log in to reply

Eg if 999999....999997 (n 9's) is the first term which is not a prime factor, then that term is \(n+1\). – Bryan Lee Shi Yang · 1 year, 10 months ago

Log in to reply