The positive m-gonal pyramidal number P and the m-gonal pyramidal number whose index is (6*P + 1) are coprime since the latter is of the form
(1/6)*(6*P + 1)*(6*P + 2)*((m – 2)*(6*P +1) – m + 5) = … =
= (3*P + 1)*(6*P + 1)*(2*P*(m – 2) + 1).
Therefore, for any m > 5 any sequence whose first term a(1) is a positive m-gonal pyramidal number and whose general term is of the form
a(n) = (3*k + 1)*(6*k + 1)*(2*k*(m – 2) + 1),
where k = Product_{i=1..n-1} a(i), is a sequence of pairwise coprime m-gonal pyramidal numbers.
The above implies, by the Fundamental theorem of arithmetic, that there are infinitely many ways to prove the infinitude of primes.
Example:
By taking as a seed the first hexagonal pyramidal number 1 (see OEIS A002412), we can construct the following sequence of pairwise coprime hexagonal pyramidal numbers: 1, 252, 2310152797, 28410981127871160285705816883937448685, ...