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.

Showing 1-9 of 9 results.

A327476 Heinz numbers of integer partitions whose mean A326567/A326568 is not a part.

Original entry on oeis.org

1, 6, 10, 12, 14, 15, 18, 20, 21, 22, 24, 26, 28, 33, 34, 35, 36, 38, 39, 40, 42, 44, 45, 46, 48, 50, 51, 52, 54, 55, 56, 57, 58, 60, 62, 63, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 82, 85, 86, 87, 88, 91, 92, 93, 94, 95, 96, 98, 99, 100, 102, 104, 106
Offset: 1

Views

Author

Gus Wiseman, Sep 13 2019

Keywords

Comments

The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			The sequence of terms together with their prime indices begins:
    1: {}
    6: {1,2}
   10: {1,3}
   12: {1,1,2}
   14: {1,4}
   15: {2,3}
   18: {1,2,2}
   20: {1,1,3}
   21: {2,4}
   22: {1,5}
   24: {1,1,1,2}
   26: {1,6}
   28: {1,1,4}
   33: {2,5}
   34: {1,7}
   35: {3,4}
   36: {1,1,2,2}
   38: {1,8}
   39: {2,6}
   40: {1,1,1,3}
		

Crossrefs

Complement of A327473.
The enumeration of these partitions by sum is given by A327472.
Subsets whose mean is not an element are A327471.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],!MemberQ[primeMS[#],Mean[primeMS[#]]]&]

A327472 Number of integer partitions of n not containing their mean.

Original entry on oeis.org

1, 0, 0, 1, 2, 5, 6, 13, 16, 25, 34, 54, 56, 99, 121, 154, 201, 295, 324, 488, 541, 725, 957, 1253, 1292, 1892, 2356, 2813, 3378, 4563, 4838, 6840, 7686, 9600, 12076, 14180, 15445, 21635, 25627, 29790, 33309, 44581, 48486, 63259, 70699, 82102, 104553, 124752
Offset: 0

Views

Author

Gus Wiseman, Sep 13 2019

Keywords

Examples

			The a(3) = 1 through a(8) = 16 partitions not containing their mean:
  (21)  (31)   (32)    (42)     (43)      (53)
        (211)  (41)    (51)     (52)      (62)
               (221)   (411)    (61)      (71)
               (311)   (2211)   (322)     (332)
               (2111)  (3111)   (331)     (422)
                       (21111)  (421)     (431)
                                (511)     (521)
                                (2221)    (611)
                                (3211)    (3311)
                                (4111)    (5111)
                                (22111)   (22211)
                                (31111)   (32111)
                                (211111)  (41111)
                                          (221111)
                                          (311111)
                                          (2111111)
		

Crossrefs

The Heinz numbers of these partitions are A327476.
Partitions with their mean are A237984.
Subsets without their mean are A327471.
Subsets with n but without their mean are A327477.
Strict partitions without their mean are A240851.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],!MemberQ[#,Mean[#]]&]],{n,0,20}]
  • Python
    from sympy.utilities.iterables import partitions
    def A327472(n): return sum(1 for s,p in partitions(n,size=True) if n%s or n//s not in p) if n else 1 # Chai Wah Wu, Sep 21 2023

A240850 Number of partitions p of n into distinct parts including mean(p).

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 2, 1, 1, 3, 1, 1, 5, 1, 1, 6, 5, 1, 6, 1, 14, 7, 1, 1, 24, 16, 1, 9, 23, 1, 58, 1, 31, 11, 1, 75, 103, 1, 1, 13, 163, 1, 202, 1, 66, 182, 1, 1, 413, 203, 246, 17, 97, 1, 550, 347, 889, 19, 1, 1, 1500, 1, 1, 1442, 982, 625, 1424, 1, 177, 23
Offset: 0

Views

Author

Clark Kimberling, Apr 14 2014

Keywords

Examples

			a(12) counts these 5 partitions:  {12}, {7,4,1}, {6,4,2}, {6,3,2,1}, {5,4,3}.
		

Crossrefs

Programs

  • Mathematica
    z = 70; f[n_] := f[n] = Select[IntegerPartitions[n], Max[Length /@ Split@#] == 1 &];
    Table[Count[f[n], p_ /; MemberQ[p, Mean[p]]], {n, 0, z}]   (* A240850 *)
    Table[Count[f[n], p_ /; ! MemberQ[p, Mean[p]]], {n, 0, z}] (* A240851 *)
  • Python
    from sympy.utilities.iterables import partitions
    def A240850(n): return sum(1 for s,p in partitions(n,size=True) if max(p.values(),default=0)==1 and not n%s and n//s in p) # Chai Wah Wu, Sep 21 2023

Formula

a(n) + A240851(n) = A000009(n) for n >= 0.

A359897 Number of strict integer partitions of n whose parts have the same mean as median.

Original entry on oeis.org

0, 1, 1, 2, 2, 3, 4, 4, 4, 7, 6, 6, 10, 7, 10, 13, 11, 9, 20, 10, 20, 18, 21, 12, 30, 24, 28, 27, 30, 15, 73, 16, 37, 43, 45, 67, 74, 19, 55, 71, 126, 21, 150, 22, 75, 225, 78, 24, 183, 126, 245, 192, 132, 27, 284, 244, 403, 303, 120, 30, 828
Offset: 0

Views

Author

Gus Wiseman, Jan 20 2023

Keywords

Examples

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

Crossrefs

The non-strict version is A240219, complement A359894, ranked by A359889.
The complement is counted by A359898.
The odd-length case is A359899, complement A359900.
A000041 counts partitions, strict A000009.
A008284/A058398/A327482 count partitions by mean, ranked by A326567/A326568.
A008289 counts strict partitions by mean.
A237984 counts partitions containing their mean, complement A327472.
A240850 counts strict partitions containing their mean, complement A240851.
A325347 counts ptns with integer median, strict A359907, ranked by A359908.

Programs

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

A359899 Number of strict odd-length integer partitions of n whose parts have the same mean as median.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 2, 1, 1, 3, 1, 1, 4, 1, 1, 6, 1, 1, 6, 1, 5, 7, 1, 1, 8, 12, 1, 9, 2, 1, 33, 1, 1, 11, 1, 50, 12, 1, 1, 13, 70, 1, 46, 1, 1, 122, 1, 1, 16, 102, 155, 17, 1, 1, 30, 216, 258, 19, 1, 1, 310, 1, 1, 666, 1, 382, 23, 1, 1, 23, 1596, 1, 393, 1, 1
Offset: 0

Views

Author

Gus Wiseman, Jan 20 2023

Keywords

Examples

			The a(30) = 33 partitions:
  (30)  (11,10,9)  (8,7,6,5,4)
        (12,10,8)  (9,7,6,5,3)
        (13,10,7)  (9,8,6,4,3)
        (14,10,6)  (9,8,6,5,2)
        (15,10,5)  (10,7,6,4,3)
        (16,10,4)  (10,7,6,5,2)
        (17,10,3)  (10,8,6,4,2)
        (18,10,2)  (10,8,6,5,1)
        (19,10,1)  (10,9,6,3,2)
                   (10,9,6,4,1)
                   (11,7,6,4,2)
                   (11,7,6,5,1)
                   (11,8,6,3,2)
                   (11,8,6,4,1)
                   (11,9,6,3,1)
                   (12,7,6,3,2)
                   (12,7,6,4,1)
                   (12,8,6,3,1)
                   (12,9,6,2,1)
                   (13,7,6,3,1)
                   (13,8,6,2,1)
                   (14,7,6,2,1)
                   (11,10,6,2,1)
		

Crossrefs

Strict odd-length case of A240219, complement A359894, ranked by A359889.
Strict case of A359895, complement A359896, ranked by A359891.
Odd-length case of A359897, complement A359898.
The complement is counted by A359900.
A000041 counts partitions, strict A000009.
A008284/A058398/A327482 count partitions by mean, ranked by A326567/A326568.
A008289 counts strict partitions by mean.
A027193 counts odd-length partitions, strict A067659, ranked by A026424.
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@@#&&OddQ[Length[#]]&&Mean[#]==Median[#]&]],{n,0,30}]
  • PARI
    \\ Q(n,k,m) is g.f. for k strict parts of max size m.
    Q(n,k,m)={polcoef(prod(i=1, m, 1 + y*x^i + O(x*x^n)), k, y)}
    a(n)={if(n==0, 0, sumdiv(n, d, if(d%2, my(m=n/d, h=d\2, r=n-m*(h+1)); if(r>=h*(h+1), polcoef(Q(r, h, m-1)*Q(r, h, r), r)))))} \\ Andrew Howroyd, Jan 21 2023

Formula

a(p) = 1 for prime p. - Andrew Howroyd, Jan 21 2023

A359900 Number of strict odd-length 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, 5, 4, 8, 10, 8, 15, 18, 17, 26, 27, 31, 43, 51, 53, 59, 81, 87, 109, 127, 115, 169, 194, 213, 255, 243, 322, 379, 431, 478, 487, 629, 667, 804, 907, 902, 1151, 1294, 1439, 1530, 1674, 2031, 2290, 2559, 2829, 2973, 3296, 3939
Offset: 0

Views

Author

Gus Wiseman, Jan 21 2023

Keywords

Examples

			The a(7) = 1 through a(16) = 15 partitions (A=10, B=11, C=12, D=13):
  (421)  (431)  (621)  (532)  (542)  (651)  (643)  (653)  (762)  (754)
         (521)         (541)  (632)  (732)  (652)  (743)  (843)  (763)
                       (631)  (641)  (831)  (742)  (752)  (861)  (853)
                       (721)  (731)  (921)  (751)  (761)  (942)  (862)
                              (821)         (832)  (842)  (A32)  (871)
                                            (841)  (851)  (A41)  (943)
                                            (931)  (932)  (B31)  (952)
                                            (A21)  (941)  (C21)  (961)
                                                   (A31)         (A42)
                                                   (B21)         (A51)
                                                                 (B32)
                                                                 (B41)
                                                                 (C31)
                                                                 (D21)
                                                                 (64321)
		

Crossrefs

This is the strict case of A359896, complement A359895, ranked by A359892.
This is the odd-length case of A359898, complement A359897.
The complement is counted by A359899.
A000041 counts partitions, strict A000009.
A008284/A058398/A327482 count partitions by mean, ranked by A326567/A326568.
A008289 counts strict partitions by mean.
A027193 counts odd-length partitions, strict A067659, ranked by A026424.
A359893/A359901/A359902 count partitions by median, ranked by A360005.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], UnsameQ@@#&&OddQ[Length[#]]&&Mean[#]!=Median[#]&]],{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}]

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

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
Showing 1-9 of 9 results.