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-20 of 22 results. Next

A360069 Number of integer partitions of n whose multiset of multiplicities has integer mean.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 9, 9, 13, 16, 25, 26, 39, 42, 62, 67, 95, 107, 147, 168, 225, 245, 327, 381, 471, 565, 703, 823, 1038, 1208, 1443, 1743, 2088, 2439, 2937, 3476, 4163, 4921, 5799, 6825, 8109, 9527, 11143, 13122, 15402, 17887, 20995, 24506, 28546, 33234, 38661
Offset: 0

Views

Author

Gus Wiseman, Jan 27 2023

Keywords

Examples

			The a(1) = 1 through a(8) = 13 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (21)   (22)    (32)     (33)      (43)       (44)
             (111)  (31)    (41)     (42)      (52)       (53)
                    (1111)  (2111)   (51)      (61)       (62)
                            (11111)  (222)     (421)      (71)
                                     (321)     (2221)     (431)
                                     (2211)    (4111)     (521)
                                     (3111)    (211111)   (2222)
                                     (111111)  (1111111)  (3311)
                                                          (5111)
                                                          (221111)
                                                          (311111)
                                                          (11111111)
For example,  the partition (3,2,1,1,1,1) has multiplicities (1,1,4) with mean 2, so is counted under a(9). On the other hand, the partition (3,2,2,1,1) has multiplicities (1,2,2) with mean 5/3, so is not counted under a(9).
		

Crossrefs

These partitions are ranked by A067340 (prime signature has integer mean).
Parts instead of multiplicities: A067538, strict A102627, ranked by A316413.
The case where the parts have integer mean also is ranked by A359905.
A000041 counts integer partitions, strict A000009.
A051293 counts subsets with integer mean, median A000975.
A058398 counts partitions by mean, see also A008284, A327482.
A088529/A088530 gives mean of prime signature (A124010).
A326622 counts factorizations with integer mean, strict A328966.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], IntegerQ[Mean[Length/@Split[#]]]&]],{n,0,30}]

A359898 Number of strict integer partitions of n whose parts do not have the same mean as median.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 4, 6, 5, 11, 12, 14, 21, 29, 26, 44, 44, 58, 68, 92, 92, 118, 137, 165, 192, 241, 223, 324, 353, 405, 467, 518, 594, 741, 809, 911, 987, 1239, 1276, 1588, 1741, 1823, 2226, 2566, 2727, 3138, 3413, 3905, 4450, 5093, 5434, 6134
Offset: 0

Views

Author

Gus Wiseman, Jan 20 2023

Keywords

Examples

			The a(7) = 1 through a(13) = 11 partitions:
  (4,2,1)  (4,3,1)  (6,2,1)  (5,3,2)  (5,4,2)    (6,5,1)    (6,4,3)
           (5,2,1)           (5,4,1)  (6,3,2)    (7,3,2)    (6,5,2)
                             (6,3,1)  (6,4,1)    (8,3,1)    (7,4,2)
                             (7,2,1)  (7,3,1)    (9,2,1)    (7,5,1)
                                      (8,2,1)    (6,3,2,1)  (8,3,2)
                                      (5,3,2,1)             (8,4,1)
                                                            (9,3,1)
                                                            (10,2,1)
                                                            (5,4,3,1)
                                                            (6,4,2,1)
                                                            (7,3,2,1)
		

Crossrefs

The non-strict version is ranked by A359890, complement A359889.
The non-strict version is A359894, complement A240219.
The complement is counted by A359897.
The odd-length case is A359900, complement A359899.
A000041 counts partitions, strict A000009.
A008284/A058398/A327482 count partitions by mean, ranked by A326567/A326568.
A008289 counts strict partitions by mean.
A067538 counts ptns with integer mean, strict A102627, ranked by A316413.
A237984 counts ptns containing their mean, strict A240850, ranked by A327473.
A325347 counts ptns with integer median, strict A359907, ranked by A359908.
A359893 and A359901 count partitions by median, odd-length A359902.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], UnsameQ@@#&&Mean[#]!=Median[#]&]],{n,0,30}]

A326644 Number of subsets of {1..n} containing n whose mean and geometric mean are both integers.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 3, 1, 1, 1, 3, 1, 7, 1, 1, 1, 1, 1, 6, 5, 1, 23, 1, 1, 1, 1, 28, 1, 1, 1, 38, 1, 1, 1, 5, 1, 1, 1, 1, 6, 1, 1, 81, 8, 28, 1, 1, 1, 126, 1, 6, 1, 1, 1, 37, 1, 1, 6, 208, 1, 1, 1, 1, 1, 1, 1, 351, 1, 1, 381, 1, 1, 1, 1, 159, 605, 1, 1, 9, 1, 1, 1, 2, 1, 1223, 1, 1, 1, 1, 1, 805, 1, 113, 2, 5021, 1, 1, 1, 2, 1, 1, 1, 2630, 1, 1, 1, 54, 1, 1, 1, 1, 2, 1, 1
Offset: 0

Views

Author

Gus Wiseman, Jul 16 2019

Keywords

Examples

			The a(1) = 1 through a(12) = 3 subsets:
  {1}  {2}  {3}  {4}  {5}  {6}  {7}  {8}    {9}    {10}  {11}  {12}
                                     {2,8}  {1,9}              {3,6,12}
                                                               {3,4,9,12}
The a(18) = 7 subsets:
  {18}
  {2,18}
  {8,18}
  {1,8,9,18}
  {2,3,8,9,18}
  {6,12,16,18}
  {2,3,4,9,12,18}
		

Crossrefs

First differences of A326643.
Subsets whose mean is an integer are A051293.
Subsets whose geometric mean is an integer are A326027.
Partitions with integer mean and geometric mean are A326641.
Strict partitions with integer mean and geometric mean are A326029.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],MemberQ[#,n]&&IntegerQ[Mean[#]]&&IntegerQ[GeometricMean[#]]&]],{n,0,10}]

Extensions

More terms from David Wasserman, Aug 03 2019

A360952 Number of strict integer partitions of n with non-integer median; a(0) = 1.

Original entry on oeis.org

1, 0, 0, 1, 0, 2, 0, 3, 0, 4, 1, 6, 1, 8, 4, 11, 5, 15, 10, 20, 13, 27, 22, 36, 28, 47, 43, 63, 56, 82, 79, 107, 103, 140, 141, 180, 181, 232, 242, 299, 308, 380, 402, 483, 511, 613, 656, 772, 824, 969, 1047, 1215, 1309, 1514, 1642, 1882, 2039, 2334, 2539, 2882
Offset: 0

Views

Author

Gus Wiseman, Mar 10 2023

Keywords

Comments

All of these partitions have even length.
The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length).

Examples

			The a(0) = 1 through a(15) = 11 partitions (0 = {}, A..E = 10..14):
  0  .  .  21  .  32  .  43  .  54  4321  65    6321  76    5432  87
                  41     52     63        74          85    6431  96
                         61     72        83          94    6521  A5
                                81        92          A3    8321  B4
                                          A1          B2          C3
                                          5321        C1          D2
                                                      5431        E1
                                                      7321        6432
                                                                  7431
                                                                  7521
                                                                  9321
		

Crossrefs

The non-strict version is A307683, ranks A359912.
The non-strict complement is A325347, ranks A359908.
The strict complement is counted by A359907.
For mean instead of median we have A361391, non-strict A349156.
A000041 counts partitions, strict A000009.
A008284/A058398/A327482 count partitions by mean.
A067538 = partitions with integer mean, complement A102627, ranks A316413.
A359893/A359901/A359902 count partitions by median.
A360005(n)/2 ranks the median statistic.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], UnsameQ@@#&&!IntegerQ[Median[#]]&]],{n,0,30}]

Formula

a(n) = A000009(n) - A359907(n).

A327471 Number of subsets of {1..n} not containing their mean.

Original entry on oeis.org

1, 1, 2, 4, 10, 22, 48, 102, 214, 440, 900, 1830, 3706, 7486, 15092, 30380, 61100, 122780, 246566, 494912, 992984, 1991620, 3993446, 8005388, 16044460, 32150584, 64414460, 129037790, 258462026, 517641086, 1036616262, 2075721252, 4156096036, 8320912744, 16658202200
Offset: 0

Views

Author

Gus Wiseman, Sep 12 2019

Keywords

Examples

			The a(1) = 1 through a(5) = 22 subsets:
  {}  {}     {}     {}         {}
      {1,2}  {1,2}  {1,2}      {1,2}
             {1,3}  {1,3}      {1,3}
             {2,3}  {1,4}      {1,4}
                    {2,3}      {1,5}
                    {2,4}      {2,3}
                    {3,4}      {2,4}
                    {1,2,4}    {2,5}
                    {1,3,4}    {3,4}
                    {1,2,3,4}  {3,5}
                               {4,5}
                               {1,2,4}
                               {1,2,5}
                               {1,3,4}
                               {1,4,5}
                               {2,3,5}
                               {2,4,5}
                               {1,2,3,4}
                               {1,2,3,5}
                               {1,2,4,5}
                               {1,3,4,5}
                               {2,3,4,5}
		

Crossrefs

Subsets containing their mean are A065795.
Subsets containing n but not their mean are A327477.
Partitions not containing their mean are A327472.
Strict partitions not containing their mean are A240851.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],!MemberQ[#,Mean[#]]&]],{n,0,10}]
  • Python
    from sympy import totient, divisors
    def A327471(n): return (1<>(~k&k-1).bit_length(),generator=True))<<1)//k for k in range(1,n+1))>>1) # Chai Wah Wu, Feb 22 2023

Formula

a(n) = 2^n - A065795(n). - Alois P. Heinz, Sep 13 2019

Extensions

More terms from Alois P. Heinz, Sep 13 2019

A327474 Number of distinct means of subsets of {1..n}, where {} has mean 0.

Original entry on oeis.org

1, 2, 4, 6, 10, 16, 26, 38, 56, 78, 106, 138, 180, 226, 284, 348, 420, 500, 596, 698, 818, 946, 1086, 1236, 1408, 1588, 1788, 2000, 2230, 2472, 2742, 3020, 3328, 3652, 3996, 4356, 4740, 5136, 5568, 6018, 6492, 6982, 7512, 8054, 8638, 9242, 9870, 10520, 11216
Offset: 0

Views

Author

Gus Wiseman, Sep 13 2019

Keywords

Examples

			The a(3) = 6 distinct means are 0, 1, 3/2, 2, 5/2, 3.
		

Crossrefs

The version for only nonempty subsets is A135342.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<4, [1, 2, 4, 6][n+1],
          2*a(n-1)-a(n-2)+numtheory[phi](n-1))
        end:
    seq(a(n), n=0..50);  # Alois P. Heinz, Feb 22 2023
  • Mathematica
    Table[Length[Union[Mean/@Subsets[Range[n]]]],{n,0,10}]
  • Python
    from itertools import count, islice
    from sympy import totient
    def A327474_gen(): # generator of terms
        a, b = 4, 6
        yield from (1,2,4,6)
        for n in count(3):
            a, b = b, (b<<1)-a+totient(n)
            yield b
    A327474_list = list(islice(A327474_gen(),30)) # Chai Wah Wu, Feb 22 2023

Formula

a(n) = A135342(n) + 1.
a(n) = 2*a(n-1) - a(n-2) + phi(n-1) for n>3. - Chai Wah Wu, Feb 22 2023

A267632 Triangle T(n, k) read by rows: the k-th column of the n-th row lists the number of ways to select k distinct numbers (k >= 1) from [1..n] so that their sum is divisible by n.

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 2, 2, 1, 1, 1, 2, 4, 3, 1, 0, 1, 3, 5, 5, 3, 1, 1, 1, 3, 7, 9, 7, 3, 1, 0, 1, 4, 10, 14, 14, 10, 4, 1, 1, 1, 4, 12, 22, 26, 20, 12, 5, 1, 0, 1, 5, 15, 30, 42, 42, 30, 15, 5, 1, 1, 1, 5, 19, 42, 66, 76, 66, 43, 19, 5, 1, 0
Offset: 1

Views

Author

Dimitri Papadopoulos, Jan 18 2016

Keywords

Comments

Row less the last element is palindrome for n=odd or n=power of 2 where n is the row number (observation-conjecture).
From Petros Hadjicostas, Jul 13 2019: (Start)
By reading carefully the proof of Lemma 5.1 (pp. 65-66) in Barnes (1959), we see that he actually proved a general result (even though he does not state it in the lemma).
According to the definition of this sequence, for 1 <= k <= n, T(n, k) is the number of unordered sets b_1, b_2, ..., b_k of k distinct integers from 1..n such that b_1 + b_2 + ... + b_k = 0 (mod n). The proof of Lemma 5.1 in Barnes (1959) implies that T(n, k) = (1/n) * Sum_{s | gcd(n, k)} (-1)^(k - (k/s)) * phi(s) * binomial(n/s, k/s) for 1 <= k <= n.
For fixed k >= 1, the g.f. of the column (T(n, k): n >= 1) (with T(n, k) = 0 for 1 <= n < k) is (x^k/k) * Sum_{s|k} phi(s) * (-1)^(k - (k/s)) / (1 - x^s)^(k/s), which generalizes Herbert Kociemba's formula from A032801.
Barnes' (1959) formula is a special case of Theorem 4 (p. 66) in Ramanathan (1944). If R(n, k, v) is the number of unordered sets b_1, b_2, ..., b_k of k distinct integers from 1..n such that b_1 + b_2 + ... + b_k = v (mod n), then he proved that R(n, k, v) = (1/n) * Sum_{s | gcd(n,k)} (-1)^(k - (k/s)) * binomial(n/s, k/s) * C_s(v), where C_s(v) = A054535(s, v) = Sum_{d | gcd(s,v)} d * Moebius(s/d) is Ramanujan's sum (even though it was first discovered around 1900 by the Austrian mathematician R. D. von Sterneck).
Because C_s(v = 0) = phi(s), we get Barnes' (implicit) result; i.e., R(n, k, v=0) = T(n, k) for 1 <= k <= n.
For k=2, we have R(n, k=2, v=0) = T(n, k=2) = A004526(n-1) for n >= 1. For k=3, we have R(n, k=3, v=0) = T(n, k=3) = A058212(n) for n >= 1. For k=4, we have R(n, k=4, v=0) = A032801(n) for n >= 1. For k=5, we have R(n, k=5, v=0) = T(n, k=5) = A008646(n-5) for n >= 5.
The reason we have T(2*m+1, k) = A037306(2*m+1, k) = A047996(2*m+1, k) for m >= 0 and k >= 1 is the following. When n = 2*m + 1, all divisors s of gcd(n, k) are odd. In such a case, k - (k/s) is even for all k >= 1, and thus (-1)^(k - (k/s)) = 1, and thus T(n = 2*m+1, k) = (1/n) * Sum_{s | gcd(n, k)} phi(s) * binomial(n/s, k/s) = A037306(2*m+1, k) = A047996(2*m+1, k).
By summing the products of the g.f. of column k times y^k from k = 1 to k = infinity, we get the bivariate g.f. for the array: Sum_{n, k >= 1} T(n, k)*x^n*y^k = Sum_{s >= 1} (phi(s)/s) * log((1 - x^s + (-x*y)^s)/(1 - x^s)) = -x/(1 - x) - Sum_{s >= 1} (phi(s)/s) * log(1 - x^s + (-x*y)^s).
Letting y = 1 in the above bivariate g.f., we get the g.f. of the sequence (Sum_{1 <= k <= n} T(n, k): n >= 1) is -x/(1 - x) - Sum_{s >= 1} (phi(s)/s) * log(1 - x^s + (-x)^s) = -x/(1 - x) + Sum_{m >= 0} (phi(2*m + 1)/(2*m + 1)) * log(1 - 2*x^(2*m+1)), which is the g.f. of sequence A082550. Hence, sequence A082550 consists of the row sums.
There is another important interpretation of this array T(n, k) which is related to some of the references for sequence A047996, but because the discussion is too lengthy, we omit the details.
(End)

Examples

			For n = 5, there is one way to pick one number (5), two ways to pick two numbers (1+4, 2+3), two ways to pick 3 numbers (1+4+5, 2+3+5), one way to pick 4 numbers (1+2+3+4), and one way to pick 5 numbers (1+2+3+4+5) so that their sum is divisible by 5. Therefore, T(5,1) = 1, T(5,2) = 2, T(5,3) = 2, T(5,4) = 1, and T(5,5) = 1.
Table for T(n,k) begins as follows:
n\k 1 2   3    4    5    6    7    8    9   10
1   1
2   1 0
3   1 1   1
4   1 1   1    0
5   1 2   2    1    1
6   1 2   4    3    1    0
7   1 3   5    5    3    1    1
8   1 3   7    9    7    3    1    0
9   1 4  10   14   14   10    4    1    1
10  1 4  12   22   26   20   12    5    1    0
...
		

Crossrefs

Programs

  • Maple
    A267632 := proc(n,k)
        local a,msel,p;
        a := 0 ;
        for msel in combinat[choose](n,k) do
            if modp(add(p,p=msel),n) = 0 then
                a := a+1 ;
            end if;
        end do:
        a;
    end proc: # R. J. Mathar, May 15 2016
    # second Maple program:
    b:= proc(n, m, s) option remember; expand(`if`(n=0,
          `if`(s=0, 1, 0), b(n-1, m, s)+x*b(n-1, m, irem(s+n, m))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..n))(b(n$2, 0)):
    seq(T(n), n=1..14);  # Alois P. Heinz, Aug 27 2018
  • Mathematica
    f[k_, n_] :=  Length[Select[Select[Subsets[Range[n]], Length[#] == k &], IntegerQ[Total[#]/n] &]];MatrixForm[Table[{n, Table[f[k, n], {k, n}]}, {n, 10}]] (* Dimitri Papadopoulos, Jan 18 2016 *)

Formula

T(2n+1, k) = A037306(2n+1, k) = A047996(2n+1, k).
From Petros Hadjicostas, Jul 13 2019: (Start)
T(n, k) = (1/n) * Sum_{s | gcd(n, k)} (-1)^(k - (k/s)) * phi(s) * binomial(n/s, k/s) for 1 <= k <= n.
G.f. for column k >= 1: (x^k/k) * Sum_{s|k} phi(s) * (-1)^(k - (k/s)) / (1 - x^s)^(k/s).
Bivariate g.f.: Sum_{n, k >= 1} T(n, k)*x^n*y^k = -x/(1 - x) - Sum_{s >= 1} (phi(s)/s) * log(1 - x^s + (-x*y)^s).
(End)
Sum_{k=1..n} k * T(n,k) = A309122(n). - Alois P. Heinz, Jul 13 2019

A309402 Number T(n,k) of nonempty subsets of [n] whose element sum is divisible by k; triangle T(n,k), n >= 1, 1 <= k <= n*(n+1)/2, read by rows.

Original entry on oeis.org

1, 3, 1, 1, 7, 3, 3, 1, 1, 1, 15, 7, 5, 3, 3, 2, 2, 1, 1, 1, 31, 15, 11, 7, 7, 5, 4, 3, 3, 3, 2, 2, 1, 1, 1, 63, 31, 23, 15, 13, 11, 9, 7, 7, 6, 5, 5, 4, 4, 4, 3, 2, 2, 1, 1, 1, 127, 63, 43, 31, 25, 21, 19, 15, 14, 12, 11, 10, 9, 9, 8, 8, 7, 7, 6, 5, 5, 4, 3, 2, 2, 1, 1, 1
Offset: 1

Views

Author

Alois P. Heinz, Jul 28 2019

Keywords

Comments

T(n,k) is defined for all n >= 0, k >= 1. The triangle contains only the positive terms. T(n,k) = 0 if k > n*(n+1)/2.

Examples

			Triangle T(n,k) begins:
   1;
   3,  1,  1;
   7,  3,  3,  1,  1,  1;
  15,  7,  5,  3,  3,  2, 2, 1, 1, 1;
  31, 15, 11,  7,  7,  5, 4, 3, 3, 3, 2, 2, 1, 1, 1;
  63, 31, 23, 15, 13, 11, 9, 7, 7, 6, 5, 5, 4, 4, 4, 3, 2, 2, 1, 1, 1;
  ...
		

Crossrefs

Column k=1 gives A000225.
Row sums give A309403.
Row lengths give A000217.
T(n,n) gives A082550.
Rows reversed converge to A000009.

Programs

  • Maple
    b:= proc(n, s) option remember; `if`(n=0, add(x^d,
          d=numtheory[divisors](s)), b(n-1, s)+b(n-1, s+n))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..degree(p)))(b(n, 0)):
    seq(T(n), n=1..10);
  • Mathematica
    b[n_, s_] := b[n, s] = If[n == 0, Sum[x^d,
        {d, Divisors[s]}], b[n-1, s] + b[n-1, s+n]];
    T[n_] := With[{p = b[n, 0]}, Table[Coefficient[p, x, i],
        {i, 1, Exponent[p, x]}]];
    Array[T, 10] // Flatten (* Jean-François Alcover, Jan 27 2021, after Alois P. Heinz *)

Formula

Sum_{k=1..n*(n+1)/2} k * T(n,k) = A309281(n).
T(n+1,n*(n+1)/2+1) = A000009(n) for n >= 0.

A327477 Number of subsets of {1..n} containing n whose mean is not an element.

Original entry on oeis.org

0, 0, 1, 2, 6, 12, 26, 54, 112, 226, 460, 930, 1876, 3780, 7606, 15288, 30720, 61680, 123786, 248346, 498072, 998636, 2001826, 4011942, 8039072, 16106124, 32263876, 64623330, 129424236, 259179060, 518975176, 1039104990, 2080374784, 4164816708, 8337289456
Offset: 0

Views

Author

Gus Wiseman, Sep 13 2019

Keywords

Examples

			The a(1) = 1 through a(5) = 12 subsets:
  {1,2}  {1,3}  {1,4}      {1,5}
         {2,3}  {2,4}      {2,5}
                {3,4}      {3,5}
                {1,2,4}    {4,5}
                {1,3,4}    {1,2,5}
                {1,2,3,4}  {1,4,5}
                           {2,3,5}
                           {2,4,5}
                           {1,2,3,5}
                           {1,2,4,5}
                           {1,3,4,5}
                           {2,3,4,5}
		

Crossrefs

Subsets whose mean is an element are A065795.
Subsets whose mean is not an element are A327471.
Subsets containing n whose mean is an element are A000016.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],MemberQ[#,n]&&!MemberQ[#,Mean[#]]&]],{n,0,10}]
  • Python
    from sympy import totient, divisors
    def A327477(n): return (1<>(~n&n-1).bit_length(),generator=True))//n if n else 0 # Chai Wah Wu, Feb 21 2023

Formula

From Alois P. Heinz, Feb 21 2023: (Start)
a(n) = A327471(n) - A327471(n-1) for n>=1.
a(n) = 2^(n-1) - A000016(n) for n>=1. (End)

Extensions

a(25)-a(34) from Alois P. Heinz, Feb 21 2023

A361655 Number of even-length integer partitions of 2n with integer mean.

Original entry on oeis.org

0, 1, 3, 4, 10, 6, 33, 8, 65, 68, 117, 12, 583, 14, 319, 1078, 1416, 18, 3341, 20, 8035, 5799, 1657, 24, 36708, 16954, 3496, 24553, 68528, 30, 192180, 32, 178802, 91561, 14625, 485598, 955142, 38, 29223, 316085, 2622697, 42, 3528870, 44, 2443527, 5740043
Offset: 0

Views

Author

Gus Wiseman, Mar 23 2023

Keywords

Examples

			The a(0) = 0 through a(5) = 6 partitions:
  .  (11)  (22)    (33)      (44)        (55)
           (31)    (42)      (53)        (64)
           (1111)  (51)      (62)        (73)
                   (111111)  (71)        (82)
                             (2222)      (91)
                             (3221)      (1111111111)
                             (3311)
                             (4211)
                             (5111)
                             (11111111)
For example, the partition (4,2,1,1) has length 4 and mean 2, so is counted under a(4).
		

Crossrefs

Even-length partitions are counted by A027187, bisection A236913.
Including odd-length partitions gives A067538 bisected, ranks A316413.
For median instead of mean we have A361653.
The odd-length version is counted by A361656.
A000041 counts integer partitions, strict A000009.
A051293 counts subsets with integer mean, median A000975.
A058398 counts partitions by mean, see also A008284, A327482.
A325347 counts partitions with integer median, complement A307683.
A326567/A326568 gives mean of prime indices.
A326622 counts factorizations with integer mean.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[2n], EvenQ[Length[#]]&&IntegerQ[Mean[#]]&]],{n,0,15}]
  • PARI
    a(n)=if(n==0, 0, sumdiv(n, d, polcoef(1/prod(k=1, 2*d, 1 - x^k + O(x*x^(2*(n-d)))), 2*(n-d)))) \\ Andrew Howroyd, Mar 24 2023

Extensions

Terms a(36) and beyond from Andrew Howroyd, Mar 24 2023
Previous Showing 11-20 of 22 results. Next