cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 11-14 of 14 results.

A363741 Number of factorizations of n satisfying (mean) = (median) = (mode), assuming there is a unique mode.

Original entry on oeis.org

0, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Gus Wiseman, Jun 26 2023

Keywords

Comments

A mode in a multiset is an element that appears at least as many times as each of the others. For example, the modes in {a,a,b,b,b,c,d,d,d} are {b,d}.
The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length).
Position of first appearance of n is: (1, 2, 4, 16, 64, 5832, 4096, ...).

Examples

			The factorization 6*9*9*12 = 5832 has mean 9, median 9, and modes {9}, so it is counted under a(5832).
The a(n) factorizations for selected n:
2   4     16        64            5832              4096
    2*2   4*4       8*8           18*18*18          64*64
          2*2*2*2   4*4*4         6*9*9*12          8*8*8*8
                    2*2*2*2*2*2   3*6*6*6*9         16*16*16
                                  2*3*3*3*3*3*3*4   4*4*4*4*4*4
                                                    2*2*2*2*2*2*2*2*2*2*2*2
		

Crossrefs

For just (mean) = (median): A359909, see A240219, A359889, A359910, A359911.
The version for partitions is A363719, unequal A363720.
For unequal instead of equal we have A363742.
A000041 counts integer partitions.
A001055 counts factorizations, strict A045778, ordered A074206.
A089723 counts constant factorizations.
A316439 counts factorizations by length, A008284 partitions.
A326622 counts factorizations with integer mean, strict A328966.
A339846 counts even-length factorizations, A339890 odd-length.

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}]

A359911 Number of integer factorizations of n into factors > 1 without the same mean as median.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 1, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 1, 0, 1, 1, 0, 0, 6, 0, 1, 0, 1, 0, 3, 0, 3, 0, 0, 0, 4, 0, 0, 1, 4, 0, 1, 0, 1, 0, 1, 0, 9, 0, 0, 1, 1, 0, 1, 0, 6, 1, 0, 0, 5, 0, 0, 0, 3, 0, 5, 0, 1, 0, 0, 0, 13, 0, 1, 1, 3, 0, 1, 0, 3, 0, 0, 0, 10
Offset: 1

Views

Author

Gus Wiseman, Jan 24 2023

Keywords

Examples

			The a(72) = 9 factorizations: (2*2*2*3*3), (2*2*2*9), (2*2*3*6), (2*2*18), (2*3*12), (2*4*9), (2*6*6), (3*3*8), (3*4*6).
		

Crossrefs

The version for partitions is A359894, complement A240219.
The complement is counted by A359909, odd-length A359910.
A001055 counts factorizations.
A326622 counts factorizations with integer mean, strict A328966.

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Length[Select[facs[n],Mean[#]!=Median[#]&]],{n,100}]
  • PARI
    median(lista) = if((#lista)%2, lista[(1+#lista)/2], (lista[#lista/2]+lista[1+(#lista/2)])/2);
    A359911(n, m=n, facs=List([])) = if(1==n, (#facs>0 && (median(facs)!=(vecsum(Vec(facs))/#facs))), my(s=0, newfacs); fordiv(n, d, if((d>1)&&(d<=m), newfacs = List(facs); listput(newfacs,d); s += A359911(n/d, d, newfacs))); (s)); \\ Antti Karttunen, Jan 20 2025

Formula

For n > 1, a(n) = A001055(n) - A359909(n). - Antti Karttunen, Jan 20 2025

Extensions

Data section extended to a(108) by Antti Karttunen, Jan 20 2025

A363721 Number of odd-length integer partitions of n satisfying (mean) = (median) = (mode), assuming there is a unique mode.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 2, 1, 3, 3, 2, 2, 2, 5, 7, 1, 2, 8, 2, 9, 16, 11, 2, 2, 15, 16, 37, 33, 2, 44, 2, 1, 79, 33, 103, 127, 2, 47, 166, 39, 2, 214, 2, 384, 738, 90, 2, 2, 277, 185, 631, 1077, 2, 1065, 1560, 477, 1156, 223, 2, 2863
Offset: 1

Views

Author

Gus Wiseman, Jun 21 2023

Keywords

Comments

The median of an odd-length partition is the middle part.
A mode in a multiset is an element that appears at least as many times as each of the others. For example, the modes of {a,a,b,b,b,c,d,d,d} are {b,d}.

Examples

			The a(n) partitions for n = {1, 3, 9, 14, 15, 18, 20, 22} (A..M = 10..22):
  1  3    9          E        F                I          K      M
     111  333        2222222  555              666        44444  22222222222
          111111111  3222221  33333            222222222  54443  32222222221
                     3322211  43332            322222221  64442  33222222211
                     4222211  53331            332222211  65441  33322222111
                              63321            422222211  74432  42222222211
                              111111111111111  432222111  74441  43222222111
                                               522222111  84431  44222221111
                                                          94421  52222222111
                                                                 53222221111
                                                                 62222221111
		

Crossrefs

All odd-length partitions are counted by A027193.
For just (mean) = (median) we have A359895, also A240219, A359899, A359910.
For just (mean) != (median) we have A359896, also A359894, A359900.
Allowing any length gives A363719, ranks A363727, non-constant A363728.
A000041 counts partitions, strict A000009.
A008284 counts partitions by length (or negative mean), strict A008289.
A359893 and A359901 count partitions by median, odd-length A359902.
A362608 counts partitions with a unique mode.
A363726 counts odd-length partitions with a unique mode.

Programs

  • Mathematica
    modes[ms_]:=Select[Union[ms],Count[ms,#]>=Max@@Length/@Split[ms]&];
    Table[Length[Select[IntegerPartitions[n],OddQ[Length[#]]&&{Mean[#]}=={Median[#]}==modes[#]&]],{n,30}]

A363742 Number of integer factorizations of n with different mean, median, and mode.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jun 27 2023

Keywords

Comments

An integer factorization of n is a multiset of positive integers > 1 with product n.
If there are multiple modes, then the mode is automatically considered different from the mean and median; otherwise, we take the unique mode.
A mode in a multiset is an element that appears at least as many times as each of the others. For example, the modes in {a,a,b,b,b,c,d,d,d} are {b,d}.
The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length).
Position of first appearance of n is: 1, 30, 48, 60, 72, 200, 160, 96, ...

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)
		

Crossrefs

Just (mean) != (median): A359911, complement A359909, partitions A359894.
The version for partitions is A363720, equal A363719, ranks A363730.
For equal instead of unequal we have A363741.
A001055 counts factorizations, strict A045778, ordered A074206.
A316439 counts factorizations by length, A008284 partitions.
A363265 counts factorizations with a unique mode.

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
Previous Showing 11-14 of 14 results.