Beautiful Triangles Let $p_1$,$p_2$,...,$p_{2017}$, be the first 2017 odd prime numbers and none are equal. Let n=product of all the primes . A triangle is a "beautiful triangle" if it is a right triangle, has sides' lengths are integers and the radius of the circumcircle of the triangle is n. Let X be the number of "beautiful triangles". Find the last 2 digits of X.
This is a tough problem, but i tried a little.
If it is a right angled triangle, then the perpendicular bisector should be parallel to the perpendicular side. Also, the circumcenter should lie somewhere on this line. Then if the radius is n, let us assume the base side can be broken into two-x and x(since perpendicular bisector). Then x can be written in terms of n. But the most difficult part is- what to do next.
Please help me!
 A: We have that:
$$n=p_1p_2...p_{2017}$$ 
and:
$$a^2+b^2=N=(2n)^2=2^2p_1^2p_2^2\dots p_{2017}^2\tag{1}$$
Essentially, on the right side you have a product of the first 2018 prime numbers squared.
Theorem 4.4 from paper Sum of two squares (Jahnavi Bhaskar) states the following (in a slightly different form):

Let $n$ be a positive integer with the following prime factorization:
  $$n=2^c(p_1^{s_1}p_2^{s_2}...p_k^{s_k})(q_1^{t_1}q_2^{t_2}...q_l^{t_l})$$
  ...where 
  $$p_i\equiv1\pmod 4$$ $$q_i\equiv3\pmod 4$$ If any $t_i$ is odd, number $n$ cannot be written as the sum of two squares. If all $t_i$ are even, the number of representations of $n$ as the sum of two squares is equal to:
  $$r(n)=4(s_1+1)(s_2+1)\dots(s_k+1)$$

(The proof seems to be highly technical and Bhaskar provides only a reference to it)
In our problem $r(N)$ represents the number of "beautiful triangles". Based on (1) we see that all primes have the same power: $s_i=2$, $t_i=2$ and therefore the number of beautiful triangles is:
$$r(N)= 4\times(2+1)^m=4\times 3^m$$
...where $m$ stands for the number of odd primes equal to 1 modulo 4 among the first 2017 odd primes. You can find $m$ by computer and I doubt that there is an easier way to do it:
Length[Select[Table[Prime[i], {i, 1, 2018}], Mod[#, 4] == 1 &]]

This returns 994. So the result is:
$$r(N)=4\times 3^{994}$$
Finding the last two digits is a fairly straightforward exercise from modular arithmetics:
$$r(N)\equiv 76 \pmod {100}$$ 
In my opinion, it's unlikely that you can solve this problem without some help from the computer. There is no exact formula for a number of primes equal to 1 (or 3) modulo 4 among the first $n$ primes. You have to count them one by one and that's something that you cannot do by hand. 
