Let $p$ be a prime and $n$ be a positive integer such that $p^2$ divides $\prod_{k=1}^n (k^2+1)$. Show that $p<2n$.
Problem
Source: CWMI 2017 Q1
Tags: number theory
14.08.2017 19:59
17.08.2017 14:37
Of course, $p^2|k^2+1$ implies $p < k+1$, so if $p^2$ divided one of these terms, we have $p<n+1 \le 2n$. Let's say that $u,v$ are first two minimal positive integers that $p|u^2+1$ and $p|v^2+1$. Then $u<v \le n$. Meanwhile, we know that $u+v \equiv 0 \pmod {p}$, so combine this with $0< u+v < 2n$ to get the conclusion.
10.08.2022 17:48
It's said that the original question was: Let p be a prime and n be a positive integer such that p^2 divides \prod_{k=1}^n (k^3+1). Show that p<2n. Given that it's the first question of the contest, the question was changed to make it easier.
23.07.2023 13:09
23.03.2024 17:51
it is basically complex combinatorics , ref PFTB
04.07.2024 04:58
Assume FTSOC that $p \geq 2n$. Since $p^2 \geq 4n^2 > n^2+1$, there does not exist $k$ such that $p^2 \mid k^2+1$. So there must exist at least $2$ distinct values of $k$ such that $1 \leq k \leq n$ and $k^2+1 \equiv 0$ (mod $p$). If $a,b$ satisfies the above condition, then $a^2 \equiv -1 \equiv b^2$ (mod $p$) $\implies (a-b)(a+b) \equiv 0$ (mod $p$) $\implies p \mid a-b$ or $p \mid a+b$. If $p \mid a-b$, then $n-1 > a-b \geq p \geq 2n$, contradiction. If $p \mid a+b$, then $2n > a+b \geq p \geq 2n$, contradiction. Hence we must have $p < 2n$.
04.07.2024 15:55
If not then we can choose a and b different from 1 to n where p divides a^2+1 and b^2+1 (since p^2 clearly cannot divide a^2+1 for a leq n) but then we have a^2 = b^2 mod p so p divides a+b or a-b, both impossible because a+b and |a-b| are both in the interval (0,p) (which is true since a+b leq n+(n-1)<p)