A336530 Number of triples of divisors d_i < d_j < d_k of n such that gcd(d_i, d_j, d_k) > 1.
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 4, 0, 5, 0, 5, 0, 0, 0, 23, 0, 0, 1, 5, 0, 12, 0, 10, 0, 0, 0, 36, 0, 0, 0, 23, 0, 12, 0, 5, 5, 0, 0, 62, 0, 5, 0, 5, 0, 23, 0, 23, 0, 0, 0, 87, 0, 0, 5, 20, 0, 12, 0, 5, 0, 12, 0, 120, 0, 0, 5, 5, 0, 12, 0, 62, 4
Offset: 1
Keywords
Examples
a(12) = 5 because the divisors of 12 are {1, 2, 3, 4, 6, 12} and GCD(d_i, d_j, d_k) > 1 for the 5 following triples of divisors: (2,4,6), (2,4,12), (2,6,12), (3,6,12) and (4,6,12).
Links
- David A. Corneth, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A275387.
Programs
-
Maple
with(numtheory):nn:=100: for n from 1 to nn do: it:=0:d:=divisors(n):n0:=nops(d): for i from 1 to n0-2 do: for j from i+1 to n0-1 do: for k from j+1 to n0 do: if igcd(d[i],d[j],d[k])> 1 then it:=it+1: else fi: od: od: od: printf(`%d, `,it): od:
-
Mathematica
Array[Count[GCD @@ # & /@ Subsets[Divisors[#], {3}], ?(# > 1 &)] &, 81] (* _Michael De Vlieger, Oct 05 2020 *)
-
PARI
a(n) = my(d=divisors(n)); sum(i=1, #d-2, sum (j=i+1, #d-1, sum (k=j+1, #d, gcd([d[i], d[j], d[k]]) > 1))); \\ Michel Marcus, Oct 31 2020
-
PARI
a(n) = {my(f = factor(n), vp = vecprod(f[,1]), d = divisors(vp), res = 0); for(i = 2, #d, res-=binomial(numdiv(n/d[i]), 3)*(-1)^omega(d[i])); res} \\ David A. Corneth, Nov 01 2020
Extensions
Name clarified by editors, Oct 31 2020
Comments