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

A349156 Number of integer partitions of n whose mean is not an integer.

Original entry on oeis.org

1, 0, 0, 1, 1, 5, 3, 13, 11, 21, 28, 54, 31, 99, 111, 125, 165, 295, 259, 488, 425, 648, 933, 1253, 943, 1764, 2320, 2629, 2962, 4563, 3897, 6840, 6932, 9187, 11994, 12840, 12682, 21635, 25504, 28892, 28187, 44581, 42896, 63259, 66766, 74463, 104278, 124752
Offset: 0

Views

Author

Gus Wiseman, Nov 14 2021

Keywords

Comments

Equivalently, partitions whose length does not divide their sum.
By conjugation, also the number of integer partitions of n with greatest part not dividing n.

Examples

			The a(3) = 1 through a(8) = 11 partitions:
  (21)  (211)  (32)    (2211)   (43)      (332)
               (41)    (3111)   (52)      (422)
               (221)   (21111)  (61)      (431)
               (311)            (322)     (521)
               (2111)           (331)     (611)
                                (421)     (22211)
                                (511)     (32111)
                                (2221)    (41111)
                                (3211)    (221111)
                                (4111)    (311111)
                                (22111)   (2111111)
                                (31111)
                                (211111)
		

Crossrefs

Below, "!" means either enumerative or set theoretical complement.
The version for nonempty subsets is !A051293.
The complement is counted by A067538, ranked by A316413.
The geometric version is !A067539, strict !A326625, ranked by !A326623.
The strict case is !A102627.
The version for prime factors is A175352, complement A078175.
The version for distinct prime factors is A176587, complement A078174.
The ordered version (compositions) is !A271654, ranked by !A096199.
The multiplicative version (factorizations) is !A326622, geometric !A326028.
The conjugate is ranked by !A326836.
The conjugate strict version is !A326850.
These partitions are ranked by A348551.
A000041 counts integer partitions.
A326567/A326568 give the mean of prime indices, conjugate A326839/A326840.
A236634 counts unbalanced partitions, complement of A047993.
A327472 counts partitions not containing their mean, complement of A237984.

Programs

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

Formula

a(n > 0) = A000041(n) - A067538(n).

A348551 Heinz numbers of integer partitions whose mean is not an integer.

Original entry on oeis.org

1, 6, 12, 14, 15, 18, 20, 24, 26, 33, 35, 36, 38, 40, 42, 44, 45, 48, 50, 51, 52, 54, 56, 58, 60, 63, 65, 66, 69, 70, 72, 74, 75, 76, 77, 80, 86, 92, 93, 95, 96, 102, 104, 106, 108, 112, 114, 117, 119, 120, 122, 123, 124, 126, 130, 132, 135, 136, 140, 141, 142
Offset: 1

Views

Author

Gus Wiseman, Nov 14 2021

Keywords

Comments

Equivalently, partitions whose length does not divide their sum.
The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.

Examples

			The terms and their prime indices begin:
   1: {}
   6: {1,2}
  12: {1,1,2}
  14: {1,4}
  15: {2,3}
  18: {1,2,2}
  20: {1,1,3}
  24: {1,1,1,2}
  26: {1,6}
  33: {2,5}
  35: {3,4}
  36: {1,1,2,2}
  38: {1,8}
  40: {1,1,1,3}
  42: {1,2,4}
  44: {1,1,5}
  45: {2,2,3}
  48: {1,1,1,1,2}
		

Crossrefs

A version counting nonempty subsets is A000079 - A051293.
A version counting factorizations is A001055 - A326622.
A version counting compositions is A011782 - A271654.
A version for prime factors is A175352, complement A078175.
A version for distinct prime factors A176587, complement A078174.
The complement is A316413, counted by A067538, strict A102627.
The geometric version is the complement of A326623.
The conjugate version is the complement of A326836.
These partitions are counted by A349156.
A000041 counts partitions.
A001222 counts prime factors with multiplicity.
A018818 counts partitions into divisors, ranked by A326841.
A143773 counts partitions into multiples of the length, ranked by A316428.
A236634 counts unbalanced partitions.
A047993 counts balanced partitions, ranked by A106529.
A056239 adds up prime indices, row sums of A112798.
A326567/A326568 gives the mean of prime indices, conjugate A326839/A326840.
A327472 counts partitions not containing their mean, complement A237984.

Programs

  • Maple
    q:= n-> (l-> nops(l)=0 or irem(add(i, i=l), nops(l))>0)(map
            (i-> numtheory[pi](i[1])$i[2], ifactors(n)[2])):
    select(q, [$1..142])[];  # Alois P. Heinz, Nov 19 2021
  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],!IntegerQ[Mean[primeMS[#]]]&]

A357710 Number of integer compositions of n with integer geometric mean.

Original entry on oeis.org

0, 1, 2, 2, 3, 4, 4, 8, 4, 15, 17, 22, 48, 40, 130, 88, 287, 323, 543, 1084, 1145, 2938, 3141, 6928, 9770, 15585, 29249, 37540, 78464, 103289, 194265, 299752, 475086, 846933, 1216749, 2261920, 3320935, 5795349, 9292376, 14825858, 25570823, 39030115, 68265801, 106030947, 178696496
Offset: 0

Views

Author

Gus Wiseman, Oct 15 2022

Keywords

Examples

			The a(6) = 4 through a(9) = 15 compositions:
  (6)       (7)        (8)         (9)
  (33)      (124)      (44)        (333)
  (222)     (142)      (2222)      (1224)
  (111111)  (214)      (11111111)  (1242)
            (241)                  (1422)
            (412)                  (2124)
            (421)                  (2142)
            (1111111)              (2214)
                                   (2241)
                                   (2412)
                                   (2421)
                                   (4122)
                                   (4212)
                                   (4221)
                                   (111111111)
		

Crossrefs

The unordered version (partitions) is A067539, ranked by A326623.
Compositions with integer average are A271654, partitions A067538.
Subsets whose geometric mean is an integer are A326027.
The version for factorizations is A326028.
The strict case is A339452, partitions A326625.
These compositions are ranked by A357490.
A011782 counts compositions.

Programs

  • Mathematica
    Table[Length[Select[Join @@ Permutations/@IntegerPartitions[n],IntegerQ[GeometricMean[#]]&]],{n,0,15}]
  • Python
    from math import prod, factorial
    from sympy import integer_nthroot
    from sympy.utilities.iterables import partitions
    def A357710(n): return sum(factorial(s)//prod(factorial(d) for d in p.values()) for s,p in partitions(n,size=True) if integer_nthroot(prod(a**b for a, b in p.items()),s)[1]) if n else 0 # Chai Wah Wu, Sep 24 2023

Extensions

More terms from David A. Corneth, Oct 17 2022

A339452 Number of compositions (ordered partitions) of n into distinct parts such that the geometric mean of the parts is an integer.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 7, 1, 1, 5, 1, 1, 9, 7, 3, 1, 3, 1, 7, 11, 13, 1, 7, 1, 11, 35, 25, 31, 27, 5, 157, 1, 31, 131, 39, 31, 33, 37, 183, 179, 135, 157, 7, 265, 3, 871, 187, 865, 259, 879, 867, 179, 1593, 6073, 1593, 271, 5995, 149, 6661, 2411, 1509, 997, 1045, 5887
Offset: 1

Views

Author

Ilya Gutkovskiy, Dec 05 2020

Keywords

Examples

			a(10) = 5 because we have [10], [9, 1], [1, 9], [8, 2] and [2, 8].
		

Crossrefs

For partitions we have A326625, non-strict A067539 (ranked by A326623).
The version for subsets is A326027.
For arithmetic mean we have A339175, non-strict A271654.
The non-strict case is counted by A357710, ranked by A357490.
A032020 counts strict compositions.
A067538 counts partitions with integer average.
A078175 lists numbers whose prime factors have integer average.
A320322 counts partitions whose product is a perfect power.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],UnsameQ@@#&&IntegerQ[GeometricMean[#]]&]],{n,0,15}] (* Gus Wiseman, Oct 30 2022 *)

A357490 Numbers k such that the k-th composition in standard order has integer geometric mean.

Original entry on oeis.org

1, 2, 3, 4, 7, 8, 10, 15, 16, 17, 24, 31, 32, 36, 42, 63, 64, 69, 70, 81, 88, 98, 104, 127, 128, 136, 170, 255, 256, 277, 278, 282, 292, 325, 326, 337, 344, 354, 360, 394, 418, 424, 511, 512, 513, 514, 515, 528, 547, 561, 568, 640, 682, 768, 769, 785, 792, 896
Offset: 1

Views

Author

Gus Wiseman, Oct 16 2022

Keywords

Comments

The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The terms together with their corresponding compositions begin:
   1: (1)
   2: (2)
   3: (1,1)
   4: (3)
   7: (1,1,1)
   8: (4)
  10: (2,2)
  15: (1,1,1,1)
  16: (5)
  17: (4,1)
  24: (1,4)
  31: (1,1,1,1,1)
  32: (6)
  36: (3,3)
  42: (2,2,2)
  63: (1,1,1,1,1,1)
  64: (7)
  69: (4,2,1)
		

Crossrefs

For regular mean we have A096199, counted by A271654 (partitions A067538).
Subsets whose geometric mean is an integer are counted by A326027.
The unordered version (partitions) is A326623, counted by A067539.
The strict case is counted by A339452, partitions A326625.
These compositions are counted by A357710.
A078175 lists numbers whose prime factors have integer average.
A320322 counts partitions whose product is a perfect power.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,1000],IntegerQ[GeometricMean[stc[#]]]&]

A358331 Number of integer partitions of n with arithmetic and geometric mean differing by one.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 2, 0, 2, 0, 1, 1, 0, 3, 3, 0, 0, 2, 2, 0, 4, 0, 0, 5, 0, 0, 4, 5, 4, 3, 2, 0, 3, 3, 10, 4, 0, 0, 7, 0, 0, 16, 2, 4, 4, 0, 0, 5, 24, 0, 6, 0, 0, 9, 0, 27, 10, 0, 7, 7, 1, 0, 44
Offset: 0

Views

Author

Gus Wiseman, Nov 09 2022

Keywords

Comments

The arithmetic and geometric mean from such partition is a positive integer. - David A. Corneth, Nov 11 2022

Examples

			The a(30) = 2 through a(36) = 3 partitions (C = 12, G = 16):
  (888222)      .  (99333311)  (G2222222111)  .  (C9662)    (G884)
  (8844111111)                                   (C9833)    (888222111111)
                                                 (8884421)  (G42222221111)
		

Crossrefs

The version for subsets seems to be close to A178832.
These partitions are ranked by A358332.
A000041 counts partitions.
A067538 counts partitions with integer average, ranked by A316413.
A067539 counts partitions with integer geometric mean, ranked by A326623.
A078175 lists numbers whose prime factors have integer average.
A320322 counts partitions whose product is a perfect power.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Mean[#]==1+GeometricMean[#]&]],{n,0,30}]
  • PARI
    a(n) = if (n, my(nb=0,vp); forpart(p=n, vp=Vec(p); if (vecsum(vp)/#p == 1 + sqrtn(vecprod(vp), #p), nb++)); nb, 0); \\ Michel Marcus, Nov 11 2022
    
  • Python
    from math import prod
    from sympy import divisors, integer_nthroot
    from sympy.utilities.iterables import partitions
    def A358331(n):
        divs = {d:n//d-1 for d in divisors(n,generator=True)}
        return sum(1 for s,p in partitions(n,m=max(divs,default=0),size=True) if s in divs and (t:=integer_nthroot(prod(a**b for a, b in p.items()),s))[1] and divs[s]==t[0]) # Chai Wah Wu, Sep 24 2023

Extensions

a(61)-a(80) from Giorgos Kalogeropoulos, Nov 11 2022
a(81)-a(84) from Chai Wah Wu, Sep 24 2023

A329966 a(n) = n! * Sum_{d|n} binomial(n-1,d-1) / d!.

Original entry on oeis.org

1, 3, 7, 61, 121, 3721, 5041, 240241, 2056321, 23768641, 39916801, 11104853761, 6227020801, 683519316481, 32048919302401, 577844178912001, 355687428096001, 261396772808371201, 121645100408832001, 202418558674082150401, 2061884451929702400001, 12935940353987812761601
Offset: 1

Views

Author

Ilya Gutkovskiy, Nov 26 2019

Keywords

Crossrefs

Programs

  • Magma
    [Factorial(n)*( &+[ Binomial(n-1,d-1)/Factorial(d):d in Divisors(n)]): n in [1..22]]; // Marius A. Burtea, Jan 02 2020
  • Maple
    N:= 30:
    V:= Vector(N):
    for d from 1 to N do
       for k from 1 to floor(N/d) do
         n:= k*d; V[n]:= V[n] + n!/d!*binomial(n-1,d-1);
    od od:
    convert(V,list); # Robert Israel, Jan 01 2020
  • Mathematica
    a[n_] := n! Sum[Binomial[n - 1, d - 1]/d!, {d, Divisors[n]}]; Table[a[n], {n, 1, 22}]
  • PARI
    a(n) = n! * sumdiv(n, d, binomial(n-1,d-1) / d!); \\ Michel Marcus, Nov 26 2019
    

A367864 a(n) = Sum_{d|n} d * binomial(n,d).

Original entry on oeis.org

1, 4, 6, 20, 10, 102, 14, 352, 270, 1370, 22, 8340, 26, 24234, 16410, 110512, 34, 551754, 38, 1944880, 817992, 7760258, 46, 39190392, 265700, 135208502, 42190254, 570003392, 58, 2631501240, 62, 9701577536, 2128920354, 39671306930, 48694870, 179231802444, 74
Offset: 1

Views

Author

Wesley Ivan Hurt, Dec 03 2023

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> n*add(binomial(n-1, d-1), d=numtheory[divisors](n)):
    seq(a(n), n=1..50);  # Alois P. Heinz, Dec 03 2023
  • Mathematica
    Table[Sum[d*Binomial[n, d], {d, Divisors[n]}], {n, 50}]
  • PARI
    a(n) = sumdiv(n, d, d * binomial(n,d)); \\ Michel Marcus, Dec 03 2023

Formula

a(p) = 2p, for p prime.
a(n) = n * A271654(n). - Alois P. Heinz, Dec 03 2023
Showing 1-8 of 8 results.