A281116 Number of factorizations of n>=2 into factors greater than 1 with no common divisor other than 1 (a(1)=0 by convention).
0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0, 1, 1, 0, 0, 2, 0, 2, 1, 1, 0, 3, 0, 1, 0, 2, 0, 4, 0, 0, 1, 1, 1, 5, 0, 1, 1, 3, 0, 4, 0, 2, 2, 1, 0, 5, 0, 2, 1, 2, 0, 3, 1, 3, 1, 1, 0, 8, 0, 1, 2, 0, 1, 4, 0, 2, 1, 4, 0, 9, 0, 1, 2, 2, 1, 4, 0, 5, 0, 1, 0, 8, 1, 1, 1, 3, 0, 8, 1, 2, 1, 1, 1, 7, 0, 2, 2, 5
Offset: 1
Keywords
Examples
a(6)=1: (2*3) a(12)=2; (2*2*3) (3*4) a(24)=3: (2*2*2*3) (2*3*4) (3*8) a(30)=4: (2*3*5) (2*15) (3*10) (5*6) a(36)=5: (2*2*3*3) (2*2*9) (2*3*6) (3*3*4) (4*9) a(96)=7: (2*2*2*2*2*3) (2*2*2*3*4) (2*2*3*8) (2*3*4*4) (2*3*16) (3*4*8) (3*32).
Links
Crossrefs
Programs
-
Mathematica
postfacs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[postfacs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]]; Table[Length[Select[postfacs[n],GCD@@#===1&]],{n,2,100}]
-
PARI
A281116(n, m=n, facs=List([])) = if(1==n, (1==gcd(Vec(facs))), my(s=0, newfacs); fordiv(n, d, if((d>1)&&(d<=m), newfacs = List(facs); listput(newfacs,d); s += A281116(n/d, d, newfacs))); (s)); \\ Antti Karttunen, Sep 08 2018
Extensions
Term a(1) = 0 prepended by Antti Karttunen, Sep 08 2018
Comments