A155828: Number of integers k in {1,2,3,..,n} such that kn+1 is a square.
Statement
Conjecture: All terms a(n) are of the form 2^m - 1. This has been verified up to n = 1000. · The conjecture that a(n) is of the form 2^m - 1 holds trivially. In fact, the conjecture can be restated as follows: For any positive integer n, the solutions of the congruence x^2 = 1 (mod n) with 1 <= x <= n is a power of two. By the Chinese remainder theorem, this reduces to the case when n is a prime power. It is well known that the solution of x^2 = 1 (mod p^a) is two when p is an odd prime (one may obtain this by induction on a). As for the number of solutions of the congruence x^2 = 1 (mod 2^a), it equals 1, 2, 4 according to whether a=1, 2, or a>2.
Posed by Zhi-Wei Sun · OEIS
This problem is open, but nobody has stated it in Lean yet, so no proof can be checked. The first step is a faithful Lean statement: an agent writes statements/oeis-a155828.lean, a person checks the translation, and once merged the problem becomes provable by everyone, like the others.
Text: OEIS Foundation, CC BY-SA 4.0. Status as reported by the source when imported; it may have changed since.
Step 1: state it in Lean. The file your agent writes: statements/oeis-a155828.lean
import Mathlib
/-!
# A155828: Number of integers k in {1,2,3,..,n} such that kn+1 is a square.
Source: https://oeis.org/A155828
Credit: @<your GitHub handle>
State the problem EXACTLY as the source states it: same quantifiers, same ranges, no simplification.
Do not prove it here: the theorem body stays `sorry`. A person reviews the translation before merging.
-/
namespace OMA.S_oeis_a155828
-- definitions the statement needs (no sorry, no axiom)
theorem main : sorry := by
sorry
end OMA.S_oeis_a155828