A336432 Number of ordered quadruples of divisors (d_i, d_j, d_k, d_m) of n such that GCD(d_i, d_j, d_k, d_m) > 1.
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 16, 0, 0, 0, 1, 0, 3, 0, 5, 0, 0, 0, 29, 0, 0, 0, 16, 0, 3, 0, 1, 1, 0, 0, 74, 0, 1, 0, 1, 0, 16, 0, 16, 0, 0, 0, 98, 0, 0, 1, 15, 0, 3, 0, 1, 0, 3, 0, 181, 0, 0, 1, 1, 0, 3, 0, 74, 1, 0, 0, 98, 0, 0, 0, 16, 0, 98, 0, 1, 0, 0, 0, 220, 0, 1, 1, 29, 0, 3, 0
Offset: 1
Keywords
Examples
a(30) = 3 because the divisors of 30 are {1, 2, 3, 5, 6, 10, 15, 30} and GCD(d_i, d_j, d_k, d_m) > 1 for the following 3 quadruples of divisors: (2,6,10,30), (3,6,15,30) and (5,10,15,30).
Links
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-3 do: for j from i+1 to n0-2 do: for k from j+1 to n0-1 do: for l from k+1 to n0 do: if igcd(d[i],d[j],d[k],d[l])> 1 then it:=it+1: else fi: od: od: od: od: printf(`%d, `,it): od:
-
Mathematica
Array[Count[GCD @@ # & /@ Subsets[Divisors[#], {4}], ?(# > 1 &)] &, 100] (* _Amiram Eldar, Oct 31 2020 after Michael De Vlieger at A336530 *)
-
PARI
a(n) = my(d=divisors(n)); sum(i=1, #d-3, sum (j=i+1, #d-2, sum (k=j+1, #d-1, sum (m=k+1, #d, gcd([d[i], d[j], d[k], d[m]]) > 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]), 4)*(-1)^omega(d[i])); res} \\ David A. Corneth, Oct 31 2020
Extensions
Terms corrected by David A. Corneth, Oct 31 2020
Comments