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-16 of 16 results.

A317807 Number of set partitions of [k] into 5 blocks with equal element sum, where k is the n-th positive integer that allows such a partition.

Original entry on oeis.org

1, 1, 68, 187, 27763, 108516, 25958279, 100664383, 26388943467, 109026138857, 33100108402861, 139752234469078, 46498731704890104, 200612215343574676, 71799817534098086846, 314741192906319529056
Offset: 1

Views

Author

Alois P. Heinz, Aug 07 2018

Keywords

Comments

k = 9, 10, 14, 15, 19, ... A047208(n+3) for n = 1, 2, 3, 4, 5, ... .

Examples

			a(1) = 1: 18|27|36|45|9 with k = 9.
a(2) = 1: 1(10)|29|38|47|56 with k = 10.
		

Crossrefs

Programs

  • Maple
    b:= proc() option remember; local i, j, t; `if`(args[1]=0,
          `if`(nargs=2, 1, b(args[t] $t=2..nargs)), add(
          `if`(args[j] -args[nargs]<0, 0, b(sort([seq(args[i]-
          `if`(i=j, args[nargs], 0), i=1..nargs-1)])[],
                    args[nargs]-1)), j=1..nargs-1))
        end:
    a:= proc(n) option remember; (k-> (m->
          b((m/5)$5, k)/5!)(k*(k+1)/2))(5+5*n/2+3/4*(1-(-1)^n))
        end:
    seq(a(n), n=1..8);
  • Mathematica
    b[args_List] := b[args] = Module[{nargs = Length[args]}, If[args[[1]] == 0, If[nargs == 3, 1, b[args // Rest]], Sum[If[args[[j]] - Last[args] < 0, 0, b[Append[Sort[Flatten[Table[args[[i]] - If[i == j, Last[args], 0], {i, 1, nargs - 1}]]], Last[args] - 1]]], {j, 1, nargs - 1}]]];
    a[n_] := a[n] = Function[k, Function[m, b[Append[Table[m/5, {5}], k]]/5!][k (k + 1)/2]][5 + 5n/2 + (3/4)(1 - (-1)^n)];
    Table[Print[n, " ", a[n]]; a[n], {n, 1, 12}] (* Jean-François Alcover, Dec 16 2020, after Alois P. Heinz *)

Formula

a(n) = A275714(A047208(n+3),5).

A321282 Number of set partitions of [n^2] into n subsets having the same sum.

Original entry on oeis.org

1, 1, 1, 9, 2650, 100664383, 808087012923418
Offset: 0

Views

Author

Alois P. Heinz, Nov 01 2018

Keywords

Examples

			a(3) = 9: 12345|69|78, 1239|456|78, 1248|357|69, 1257|348|69, 1347|258|69, 1356|249|78, 159|2346|78, 168|249|357, 159|267|348.
		

Crossrefs

Programs

  • Maple
    b:= proc(l, n) option remember; `if`(n=0, 1, add(`if`(n>l[j],
           0, b(sort(subsop(j=l[j]-n, l)), n-1)), j=1..nops(l)))
        end:
    a:= n-> b([n*(1+n^2)/2$n], n^2)/n!:
    seq(a(n), n=0..5);
  • Mathematica
    b[l_, n_] := b[l, n] = If[n == 0, 1, Sum[If[n > l[[j]], 0, b[Sort[ ReplacePart[l, j -> l[[j]] - n]], n-1]], {j, 1, Length[l]}]];
    a[n_] := b[Table[n(1+n^2)/2, {n}], n^2]/n!;
    a /@ Range[0, 5] (* Jean-François Alcover, May 04 2020, after Maple *)

Formula

a(n) = A275714(n^2,n).

A361910 Number of set partitions of {1..n} such that the mean of the means of the blocks is (n+1)/2.

Original entry on oeis.org

1, 2, 3, 7, 12, 47, 99, 430, 1379, 5613, 21416, 127303, 532201, 3133846, 18776715, 114275757, 737859014
Offset: 1

Views

Author

Gus Wiseman, Apr 14 2023

Keywords

Comments

Since (n+1)/2 is the mean of {1..n}, this sequence counts a type of "transitive" set partitions.

Examples

			The a(1) = 1 through a(5) = 12 set partitions:
  {{1}}  {{12}}    {{123}}      {{1234}}        {{12345}}
         {{1}{2}}  {{13}{2}}    {{12}{34}}      {{1245}{3}}
                   {{1}{2}{3}}  {{13}{24}}      {{135}{24}}
                                {{14}{23}}      {{15}{234}}
                                {{1}{23}{4}}    {{1}{234}{5}}
                                {{14}{2}{3}}    {{12}{3}{45}}
                                {{1}{2}{3}{4}}  {{135}{2}{4}}
                                                {{14}{25}{3}}
                                                {{15}{24}{3}}
                                                {{1}{24}{3}{5}}
                                                {{15}{2}{3}{4}}
                                                {{1}{2}{3}{4}{5}}
The set partition {{1,3},{2,4}} has means {2,3}, with mean 5/2, so is counted under a(4).
The set partition {{1,3,5},{2,4}} has means {3,3}, with mean 3, so is counted under a(5).
		

Crossrefs

For median instead of mean we have A361863.
A000110 counts set partitions.
A308037 counts set partitions with integer mean block-size.
A327475 counts subsets with integer mean, A000975 with integer median.
A327481 counts subsets by mean, A013580 by median.
A361865 counts set partitions with integer mean of means.
A361911 counts set partitions with integer sum of means.

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]& /@ sps[Complement[set,s]]] /@ Cases[Subsets[set],{i,_}];
    Table[Length[Select[sps[Range[n]],Mean[Join@@#]==Mean[Mean/@#]&]],{n,8}]

Extensions

a(13)-a(17) from Christian Sievers, May 12 2025

A317806 Number of set partitions of [k] into 4 blocks with equal element sum, where k is the n-th positive integer that allows such a partition.

Original entry on oeis.org

1, 1, 871, 2650, 9462094, 31650271, 171019406993, 595828948333, 4107584704538352, 14702365152800667, 118513210888679225825, 432046935173440593804, 3881432331405193485285518, 14337098117309087488187476, 139477762791757859249400365738, 520312171172086830267314753894
Offset: 1

Views

Author

Alois P. Heinz, Aug 07 2018

Keywords

Comments

k = 7, 8, 15, 16, 23, ... A047521(n+1) for n = 1, 2, 3, 4, 5, ... .

Examples

			a(1) = 1: 16|25|34|7 with k = 7.
a(2) = 1: 18|27|36|45 with k = 8.
		

Crossrefs

Programs

  • Maple
    b:= proc() option remember; local i, j, t; `if`(args[1]=0,
          `if`(nargs=2, 1, b(args[t] $t=2..nargs)), add(
          `if`(args[j] -args[nargs]<0, 0, b(sort([seq(args[i]-
          `if`(i=j, args[nargs], 0), i=1..nargs-1)])[],
                    args[nargs]-1)), j=1..nargs-1))
        end:
    a:= proc(n) option remember; (k-> (m->
          b((m/4)$4, k)/24)(k*(k+1)/2))(4*n+3/2*(1-(-1)^n))
        end:
    seq(a(n), n=1..8);

Formula

a(n) = A275714(A047521(n+1),4).

A320438 Irregular triangle read by rows where T(n,k) is the number of set partitions of {1,...,n} with all block-sums equal to d, where d is the k-th divisor of n*(n+1)/2 that is >= n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 3, 7, 1, 1, 9, 1, 1, 1, 1, 43, 35, 1, 1, 102, 62, 1, 1, 1, 1, 68, 595, 1, 1, 17, 187, 871, 1480, 361, 1, 1, 2650, 657, 1, 1, 9294, 1, 1, 23728, 1, 1, 27763, 4110, 1, 1, 1850, 25035, 108516, 157991, 7636, 1, 1, 11421, 411474, 1
Offset: 1

Views

Author

Gus Wiseman, Jan 08 2019

Keywords

Examples

			Triangle begins:
    1
    1
    1    1
    1    1
    1    1
    1    1
    1    4    1
    1    3    7    1
    1    9    1
    1    1
    1   43   35    1
    1  102   62    1
    1    1
    1   68  595    1
    1   17  187  871 1480  361    1
    1 2650  657    1
Row 8 counts the following set partitions:
  {{18}{27}{36}{45}}  {{1236}{48}{57}}  {{12348}{567}}  {{12345678}}
                      {{138}{246}{57}}  {{12357}{468}}
                      {{156}{237}{48}}  {{12456}{378}}
                                        {{1278}{3456}}
                                        {{1368}{2457}}
                                        {{1458}{2367}}
                                        {{1467}{2358}}
		

Crossrefs

Programs

  • Mathematica
    spsu[,{}]:={{}};spsu[foo,set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@spsu[Select[foo,Complement[#,Complement[set,s]]=={}&],Complement[set,s]]]/@Cases[foo,{i,_}];
    Table[Length[spsu[Select[Subsets[Range[n]],Total[#]==d&],Range[n]]],{n,12},{d,Select[Divisors[n*(n+1)/2],#>=n&]}]

Extensions

More terms from Jinyuan Wang, Feb 27 2025
Name edited by Peter Munn, Mar 06 2025

A361863 Number of set partitions of {1..n} such that the median of medians of the blocks is (n+1)/2.

Original entry on oeis.org

1, 2, 3, 9, 26, 69, 335, 1018, 6629, 22805, 182988, 703745
Offset: 1

Views

Author

Gus Wiseman, Apr 04 2023

Keywords

Comments

The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length).
Since (n+1)/2 is the median of {1..n}, this sequence counts "transitive" set partitions.

Examples

			The a(1) = 1 through a(4) = 9 set partitions:
  {{1}}  {{12}}    {{123}}      {{1234}}
         {{1}{2}}  {{13}{2}}    {{12}{34}}
                   {{1}{2}{3}}  {{124}{3}}
                                {{13}{24}}
                                {{134}{2}}
                                {{14}{23}}
                                {{1}{23}{4}}
                                {{14}{2}{3}}
                                {{1}{2}{3}{4}}
The set partition {{1,4},{2,3}} has medians {5/2,5/2}, with median 5/2, so is counted under a(4).
The set partition {{1,3},{2,4}} has medians {2,3}, with median 5/2, so is counted under a(4).
		

Crossrefs

For mean instead of median we have A361910.
A000110 counts set partitions.
A000975 counts subsets with integer median, mean A327475.
A013580 appears to count subsets by median, A327481 by mean.
A325347 counts partitions w/ integer median, complement A307683.
A359893 and A359901 count partitions by median, odd-length A359902.
A360005 gives twice median of prime indices, distinct A360457.
A361864 counts set partitions with integer median of medians, means A361865.
A361866 counts set partitions with integer sum of medians, means A361911.

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]& /@ sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    Table[Length[Select[sps[Range[n]],(n+1)/2==Median[Median/@#]&]],{n,6}]
Previous Showing 11-16 of 16 results.