A317751 Number of divisors d of n such that there exists a factorization of n into factors > 1 with GCD d.
0, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1, 3, 1, 2, 2, 3, 1, 3, 1, 3, 2, 2, 1, 3, 2, 2, 2, 3, 1, 2, 1, 3, 2, 2, 2, 5, 1, 2, 2, 3, 1, 2, 1, 3, 3, 2, 1, 4, 2, 3, 2, 3, 1, 3, 2, 3, 2, 2, 1, 3, 1, 2, 3, 4, 2, 2, 1, 3, 2, 2, 1, 5, 1, 2, 3, 3, 2, 2, 1, 4, 3, 2, 1, 3, 2, 2, 2, 3, 1, 3, 2, 3, 2, 2, 2, 4, 1, 3, 3, 5, 1, 2, 1, 3, 2
Offset: 1
Keywords
Examples
The divisors of 36 that are possible GCDs of factorizations of 36 are {1, 2, 3, 6, 36}, so a(36) = 5.
Links
Crossrefs
Programs
-
Mathematica
facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]]; goc[n_,m_]:=Length[Select[facs[n],And[And@@(Divisible[#,m]&/@#),GCD@@(#/m)==1]&]]; Table[Length[Select[Divisors[n],goc[n,#]!=0&]],{n,100}]
-
PARI
A317751aux(n, m, facs, gcds) = if(1==n, setunion([gcd(Vec(facs))],gcds), my(newfacs); fordiv(n, d, if((d>1)&&(d<=m), newfacs = List(facs); listput(newfacs,d); gcds = setunion(gcds,A317751aux(n/d, d, newfacs, gcds)))); (gcds)); A317751(n) = if(1==n,0,length(A317751aux(n, n, List([]), Set([])))); \\ Antti Karttunen, Sep 08 2018
Extensions
More terms from Antti Karttunen, Sep 08 2018
Comments