0%

Problem 730


Problem 730


Shifted Pythagorean Triples

For a non-negative integer $k$, the triple $(p,q,r)$ of positive integers is called a $k$-shifted Pythagorean triple if $$p^2 + q^2 + k = r^2$$

$(p, q, r)$ is said to be primitive if $\gcd(p, q, r)=1$.

Let $P_k(n)$ be the number of primitive k-shifted Pythagorean triples such that $1 \le p \le q \le r$ and $p + q + r \le n$.
For example, $P_0(10^4) = 703$ and $P_{20}(10^4) = 1979$.

Define
$$\displaystyle S(m,n)=\sum_{k=0}^{m}P_k(n)$$
You are given that $S(10,10^4) = 10956$.

Find $S(10^2,10^8)$.


移位勾股数

对于非负整数$k$,若正整数三元组$(p,q,r)$满足
$$p^2 + q^2 + k = r^2$$
则称之为$k$-移位勾股数。若进一步地$(p, q, r)$满足$\gcd(p, q, r)=1$,则称为$k$-移位本原勾股数。

记$P_k(n)$为满足$1 \le p \le q \le r$和$p + q + r \le n$的$k$-移位本原勾股数的数目。
例如,$P_0(10^4) = 703$,$P_{20}(10^4) = 1979$。


$$\displaystyle S(m,n)=\sum_{k=0}^{m}P_k(n)$$
已知$S(10,10^4) = 10956$。

求$S(10^2,10^8)$。