Number Theory – Question About the Divisibility of a Sum

divisibilityelementary-number-theoryfactorialsums-of-squares

In this post , the function $$f(n):=\sum_{j=1}^n j!^2$$ is mentioned. $f(n)$ seems to be squarefree for every positive integer $n$.

Do we have $n+1\mid f(n)$ for some positive integer $n$ ? The conjecture is that the answer to this question is "no" : For no positive integer $n\le 10^5$ , this divisibility holds.

Motivation : I want to show that the smallest prime factor of $f(n)$ must exceed $n$. If $p$ is a prime number with $p\le n$ and if we have $p\mid f(n)$ , then we can easily conclude $p\mid f(p-1)$ , so this has to be ruled out. It would be enough for this purpose to show the above conjecture for the case that $n+1$ is prime , but I think , if there is a proof then the proof covers all positive integers.

Any ideas ?

Best Answer

First of all, we can reduce our search to the $n$ such that $n+1$ is prime.

The proof of this can be done using induction (as you sorta already did):

Let $n+1$ be the first number such that $n+1 | f(n)$.

If $n+1$ is composite we can write $n+1=k \cdot p$ with $k \in \mathbb N$, $k > 1$ and $p < n$. We have $$n+1 | f(n) \implies k\cdot p | f(n) \implies p | f(n) \implies p|f(p-1) \,.$$ Since $p < n+1$ we have found a smaller number that satisfies the relation. Therefore the first $n+1$ such that $n+1|f(n)$ must be a prime.

Using this I wrote a program that searches for the first $p$ such that $p | f(p-1)$.

I found $p=1248829$ giving $n=1248828$, and indeed $n+1|f(n)$, disproving the conjecture.

However, I have not found any composite integer satisfying the relation yet.

Related Question