A334080 Number of Pythagorean triples among the divisors of 60*n.
1, 2, 2, 3, 2, 4, 2, 4, 3, 4, 2, 6, 3, 4, 4, 5, 2, 6, 2, 6, 4, 4, 2, 8, 3, 6, 4, 6, 2, 8, 2, 6, 4, 5, 4, 9, 2, 4, 6, 8, 2, 8, 2, 6, 6, 4, 2, 10, 3, 6, 4, 9, 2, 8, 4, 8, 4, 4, 2, 12, 2, 4, 6, 7, 6, 8, 2, 8, 4, 9, 2, 12, 2, 4, 6, 6, 4, 12, 2, 10, 5, 4, 2, 12, 4
Offset: 1
Keywords
Examples
a(4) = 3 because the divisors of A169823(4) = 240 are {1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 16, 20, 24, 30, 40, 48, 60, 80, 120, 240} with 3 Pythagorean triples: (3, 4, 5), (6, 8, 10) and (12, 16, 20). The first triple is primitive.
Links
- Michel Lagneau, Odd terms.
Programs
-
Maple
with(numtheory): for n from 60 by 60 to 5400 do : d:=divisors(n):n0:=nops(d):it:=0: for i from 1 to n0-1 do: for j from i+1 to n0-2 do : for m from i+2 to n0 do: if d[i]^2 + d[j]^2 = d[m]^2 then it:=it+1: else fi: od: od: od: printf(`%d, `,it): od:
-
PARI
ishypo(n) = setsearch(Set(factor(n)[, 1]%4), 1); \\ A009003 a(n) = {n *= 60; my(d=divisors(n), nb=0); for (i=3, #d, if (ishypo(d[i]), for (j=2, i-1, for (k=3, j-1, if (d[j]^2 + d[k]^2 == d[i]^2, nb++););););); nb;} \\ Michel Marcus, Apr 26 2020
Comments