A363742 Number of integer factorizations of n with different mean, median, and mode.
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 4, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 4, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0, 0, 7, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 4, 0, 1, 0, 3, 0, 1, 0, 0, 0, 0, 0, 7
Offset: 1
Keywords
Examples
The a(n) factorizations for n = 30, 48, 60, 72, 96, 144: (2*3*5) (2*3*8) (2*5*6) (2*4*9) (2*6*8) (2*8*9) (2*2*3*4) (2*3*10) (3*4*6) (3*4*8) (3*6*8) (2*2*3*5) (2*3*12) (2*3*16) (2*3*24) (2*2*3*6) (2*4*12) (2*4*18) (2*2*3*8) (2*6*12) (2*2*4*6) (3*4*12) (2*3*4*4) (2*2*4*9) (2*3*4*6) (2*2*3*12) (2*2*3*3*4)
Links
- Antti Karttunen, Table of n, a(n) for n = 1..65537
Crossrefs
Programs
-
Mathematica
facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&, Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]]; modes[ms_]:=Select[Union[ms],Count[ms,#]>=Max@@Length/@Split[ms]&]; Table[Length[Select[facs[n],{Mean[#]}!={Median[#]}!=modes[#]&]],{n,100}]
-
PARI
median(lista) = if((#lista)%2, lista[(1+#lista)/2], (lista[#lista/2]+lista[1+(#lista/2)])/2); uniqmode(lista) = { my(freqs=Map(),v); for(i=1,#lista,if(!mapisdefined(freqs,lista[i],&v), v = 0); mapput(freqs,lista[i],1+v)); my(keys=Vec(freqs), fr, mc=0, mf=0, isuniq=0); for(i=1,#keys, fr = mapget(freqs,keys[i]); if(fr>=mf, isuniq = (fr>mf); mf = fr; mc = keys[i])); if(!isuniq, -1, mc); }; \\ Returns -1 if not unique mode. all_different(facs) = { my(mean=(vecsum(facs)/#facs), med=median(facs), mode=uniqmode(facs)); ((mean!=med) && (mean!=mode) && (med!=mode)); }; A363742(n, m=n, facs=List([])) = if(1==n, (#facs>0 && all_different(Vec(facs))), my(s=0, newfacs); fordiv(n, d, if((d>1)&&(d<=m), newfacs = List(facs); listput(newfacs,d); s += A363742(n/d, d, newfacs))); (s)); \\ Antti Karttunen, Jan 29 2025
Extensions
More terms from Antti Karttunen, Jan 29 2025
Comments