For which positive integers $b > 2$ do there exist infinitely many positive integers $n$ such that $n^2$ divides $b^n+1$?

[i]Evan Chen and Ankan Bhattacharya[/i]
1. **Part 1: Prove that there are infinitely many \( n \) that satisfy the problem condition for all \( b \) so that \( b+1 \) is not a power of 2.**

   To prove this, we will first prove the following claims:

   **Claim 1:** For any odd prime \( p \mid b+1 \), then \( p^2 \mid b^p + 1 \).

   **Proof of Claim 1:**
   By the Lifting The Exponent (LTE) lemma, we have:
   \[
   \nu_p(b^p + 1) = \nu_p(b + 1) + \nu_p(p) \geq 2
   \]
   This shows that \( p^2 \mid b^p + 1 \). \(\blacksquare\)

   **Claim 2:** If \( n \) is the product of some number of distinct odd primes, at least one of which divides \( b+1 \), and \( n^2 \mid b^n + 1 \), then there exists a prime \( q \nmid n \) so that \( (nq)^2 \mid b^{nq} + 1 \).

   **Proof of Claim 2:**
   By Zsigmondy's theorem, there exists a prime \( q \) so that \( q \mid b^n + 1 \) and \( q \nmid b^k + 1 \) for all \( k < n \). We will show that \( q \nmid n \).

   If \( q \mid n \), then \( q \mid b^n + 1 \implies b^n \equiv -1 \pmod{q} \implies b^{2n} \equiv 1 \pmod{q} \). Thus, the order of \( b \) modulo \( q \) divides \( \gcd(2n, q-1) = 2 \). So \( b^2 \equiv 1 \pmod{q} \implies q \mid (b-1)(b+1) \).

   If \( q \mid b+1 \), then \( q \mid b^1 + 1 \), a contradiction.

   If \( q \mid b-1 \), then \( b \equiv 1 \pmod{q} \implies b^n + 1 \equiv 2 \pmod{q} \), a contradiction as \( q > 2 \).

   Thus, \( q \nmid n \). Since \( n^2 \mid b^n + 1 \), \( n^2 \mid b^{nq} + 1 \). By LTE:
   \[
   \nu_q(b^{nq} + 1) = \nu_q((b^n)^q + 1^q) = \nu_q(b^n + 1) + \nu_q(q) \geq 2,
   \]
   which proves \( (nq)^2 \mid b^{nq} + 1 \). \(\blacksquare\)

   It's clear after proving these claims, we can create an infinite sequence of distinct primes \( p_0, p_1, \ldots \) so that \( p_0 p_1 \cdots p_k \) satisfies the problem condition for all nonnegative integers \( k \) with \( p_0 \mid b+1 \).

2. **Part 2: Prove that all \( b \) so that \( b+1 \) is a power of 2 don't work.**

   In fact, we will prove the stronger claim.

   **Claim:** For \( b \) so that \( b+1 \) is a power of 2, the only positive integer \( n \) so that \( n^2 \mid b^n + 1 \) is \( n = 1 \).

   **Proof:**
   Obviously \( n = 1 \) works, henceforth assume \( n > 1 \). If \( n \) is even, then \( 4 \mid b^n + 1 \implies b^n \equiv 3 \pmod{4} \), not possible as \( b^n \) is a square. Thus, \( n \) is odd.

   Let \( p \) be the smallest prime factor of \( n \).

   Then \( b^n \equiv -1 \pmod{p} \implies b^{2n} \equiv 1 \pmod{p} \), so the order of \( b \) modulo \( p \) divides \( \gcd(2n, p-1) = 2 \).

   Thus, \( b^2 \equiv 1 \pmod{p} \implies p \mid (b-1)(b+1) \implies p \mid b-1 \) as \( b+1 \) has no prime factors greater than 2.

   But then \( b \equiv 1 \pmod{p} \implies b^n + 1 \equiv 2 \pmod{p} \), a contradiction. \(\blacksquare\)

The final answer is \( \boxed{ b+1 \text{ is not a power of } 2 } \)