(adsbygoogle = window.adsbygoogle || []).push({}); [All numbers as assumed to be integers]

Bocard's problem asks to find the solutions to the Diophantine equation [itex]n!=m^2-1[/itex]. The only known [itex](n,m)[/itex] pairs are [itex](4,5),(5,11),(7,71)[/itex], and it is conjectured that there are no more. A generalization of this problem would be [itex]n!=m^2-A[/itex]. I've been playing around with this formula, and while I do not have a general proof right now, it seems that one could prove there to be for any non-square [itex]A[/itex] a finite number of solutions (usually 0).

As an example, consider the solutions to [itex]n!=m^2-5[/itex]. To show it has a finite number of solutions, consider the equation in terms of mod 3. Assuming [itex]n\geq3[/itex], then [itex]n!\bmod3=0[/itex], and if it can be shown that [itex]m^2 \equiv 2 \pmod{3}[/itex] has no solutions, then [itex]n!=m^2-5[/itex] cannot have a solution with [itex]n\geq3[/itex]. It is simple enough to show that the solution set to [itex]m^2 \equiv 2 \pmod{3}[/itex] is null. As [itex]3x[/itex], [itex]3x+1[/itex], and [itex]3x+2[/itex] include all integers, showing that [itex](3x)^2=9x\equiv 0 \pmod{3}[/itex], [itex](3x+1)^2=9x^2+6x+1 \equiv 1 \pmod{3}[/itex], [itex](3x+2)^2=9x+12x+4\equiv 1 \pmod{3}[/itex] demonstrates that any [itex]n^2\bmod3[/itex] will be 0 or 1, but never 2. Therefore, [itex]n[/itex] can only equal 1 or 2; since neither provides a solution, the equation at [itex]A=5[/itex] has no solutions.

Making a quick list of [itex]a^2\bmod b[/itex] cycles (I say cycle since the first [itex]a[/itex] terms will repeat ad infinitum over [itex]b[/itex]) and determining which numbers mod b do not exist therein gives a method for finding linear equations for which numbers will have finite solutions. For example, [itex]a^2\bmod 3[/itex] will never include 2. Therefore, for all integers [itex]k[/itex], [itex]A=3k+2[/itex] will have a finite solution set. It's easy enough to write a program to loop through the first several [itex]b[/itex]'s and it seems that only numbers in the form [itex]n!=m^2-s^2[/itex] cannot be proven finite by this method; this is simply an observed pattern without a general proof.

Does anyone have any thoughts on this (definitely let me know if I've come to incorrect conclusions)? Is there a good way to go about proving that for all non-square [itex]A[/itex]'s there is a finite number of solutions?

---

Edit: My program confirms that non-square numbers from [itex]A=[/itex] 2 to 224 have finite solutions with an upper bound [itex]B[/itex] for [itex]n[/itex] at [itex]B\leq13[/itex]. This is what leads me to wonder if this extends to infinity.

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Variant of Bocard's Problem

**Physics Forums | Science Articles, Homework Help, Discussion**