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 21 results. Next

A326624 Heinz numbers of non-constant integer partitions whose geometric mean is an integer.

Original entry on oeis.org

14, 42, 46, 57, 76, 106, 126, 161, 183, 185, 194, 196, 228, 230, 302, 371, 378, 393, 399, 412, 424, 454, 477, 515, 588, 622, 679, 684, 687, 722, 742, 781, 786, 838, 1057, 1064, 1077, 1082, 1115, 1134, 1150, 1157, 1159, 1219, 1244, 1272, 1322, 1563, 1589, 1654
Offset: 1

Views

Author

Gus Wiseman, Jul 14 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:
    14: {1,4}
    42: {1,2,4}
    46: {1,9}
    57: {2,8}
    76: {1,1,8}
   106: {1,16}
   126: {1,2,2,4}
   161: {4,9}
   183: {2,18}
   185: {3,12}
   194: {1,25}
   196: {1,1,4,4}
   228: {1,1,2,8}
   230: {1,3,9}
   302: {1,36}
   371: {4,16}
   378: {1,2,2,2,4}
   393: {2,32}
   399: {2,4,8}
   412: {1,1,27}
		

Crossrefs

The case with prime powers is A326623.
Subsets whose geometric mean is an integer are A326027.

Programs

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

A326672 The positions of ones in the binary expansion of n have integer geometric mean.

Original entry on oeis.org

1, 2, 4, 8, 9, 13, 16, 18, 26, 32, 36, 52, 64, 72, 104, 128, 144, 208, 256, 257, 288, 321, 416, 512, 514, 576, 642, 832, 1024, 1028, 1152, 1284, 1664, 2048, 2056, 2304, 2568, 3328, 4096, 4112, 4608, 5136, 6656, 8192, 8224, 9216, 10272, 13312, 16384, 16448
Offset: 1

Views

Author

Gus Wiseman, Jul 17 2019

Keywords

Crossrefs

Partitions with integer geometric mean are A067539.
Subsets with integer geometric mean are A326027.
Factorizations with integer geometric mean are A326028.
Numbers whose binary expansion positions have integer mean are A326669.
Numbers whose binary expansion positions are relatively prime are A326674.
Numbers whose reversed binary expansion positions have integer geometric mean are A326673.

Programs

  • Mathematica
    Select[Range[100],IntegerQ[GeometricMean[Join@@Position[IntegerDigits[#,2],1]]]&]

A271654 a(n) = Sum_{k|n} binomial(n-1,k-1).

Original entry on oeis.org

1, 2, 2, 5, 2, 17, 2, 44, 30, 137, 2, 695, 2, 1731, 1094, 6907, 2, 30653, 2, 97244, 38952, 352739, 2, 1632933, 10628, 5200327, 1562602, 20357264, 2, 87716708, 2, 303174298, 64512738, 1166803145, 1391282, 4978661179, 2, 17672631939, 2707475853, 69150651910, 2, 286754260229, 2, 1053966829029, 115133177854, 4116715363847, 2, 16892899722499, 12271514, 63207357886437
Offset: 1

Views

Author

Keywords

Comments

Also the number of compositions of n whose length divides n, i.e., compositions with integer mean, ranked by A096199. - Gus Wiseman, Sep 28 2022

Examples

			From _Gus Wiseman_, Sep 28 2022: (Start)
The a(1) = 1 through a(6) = 17 compositions with integer mean:
  (1)  (2)    (3)      (4)        (5)          (6)
       (1,1)  (1,1,1)  (1,3)      (1,1,1,1,1)  (1,5)
                       (2,2)                   (2,4)
                       (3,1)                   (3,3)
                       (1,1,1,1)               (4,2)
                                               (5,1)
                                               (1,1,4)
                                               (1,2,3)
                                               (1,3,2)
                                               (1,4,1)
                                               (2,1,3)
                                               (2,2,2)
                                               (2,3,1)
                                               (3,1,2)
                                               (3,2,1)
                                               (4,1,1)
                                               (1,1,1,1,1,1)
(End)
		

Crossrefs

Cf. A056045.
The version for nonempty subsets is A051293, geometric A326027.
The version for partitions is A067538, ranked by A316413, strict A102627.
These compositions are ranked by A096199.
The version for factorizations is A326622, geometric A326028.
A011782 counts compositions.
A067539 = partitions w integer geo mean, ranked by A326623, strict A326625.
A100346 counts compositions into divisors, partitions A018818.

Programs

  • Maple
    a:= 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[Length[Join @@ Permutations/@Select[IntegerPartitions[n],IntegerQ[Mean[#]]&]],{n,15}] (* Gus Wiseman, Sep 28 2022 *)
  • PARI
    a(n)=sumdiv(n,k,binomial(n-1,k-1))

A082553 Number of sets of distinct positive integers whose geometric mean is an integer, the largest integer of a set is n.

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 1, 3, 7, 1, 1, 7, 1, 1, 1, 9, 1, 29, 1, 3, 1, 1, 1, 31, 15, 1, 87, 3, 1, 1, 1, 115, 1, 1, 1, 257, 1, 1, 1, 17, 1, 1, 1, 3, 21, 1, 1, 519, 23, 141, 1, 3, 1, 847, 1, 19, 1, 1, 1, 215, 1, 1, 27, 1557, 1, 1, 1, 3, 1, 1, 1, 2617, 1, 1, 3125, 3, 1, 1
Offset: 1

Views

Author

Naohiro Nomoto, May 03 2003

Keywords

Comments

a(n) = 1 if and only if n is squarefree (i.e., if and only if n is in A005117). - Nathaniel Johnston, Apr 28 2011
If n has a prime divisor p > sqrt(n), then a(n) = a(n/p). - Max Alekseyev, Aug 27 2013

Examples

			a(4) = 3: the three sets are {4}, {1, 4}, {1, 2, 4}.
		

Crossrefs

Subsets whose mean is an integer are A051293.
Partitions whose geometric mean is an integer are A067539.
Partial sums are A326027.
Strict partitions whose geometric mean is an integer are A326625.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],MemberQ[#,n]&&IntegerQ[GeometricMean[#]]&]],{n,15}] (* Gus Wiseman, Jul 19 2019 *)
  • PARI
    { A082553(n) = my(m,c=0); if(issquarefree(n),return(1)); m = Set(vector(n-1,i,i)); forprime(p=sqrtint(n)+1,n, m = setminus(m,vector(n\p,i,p*i)); if(Mod(n,p)==0, return(A082553(n\p)) ); ); forvec(v=vector(#m,i,[0,1]), c += ispower(n*factorback(m,v),1+vecsum(v)) ); c; } \\ Max Alekseyev, Aug 31 2013
    
  • Python
    from sympy import factorint, factorial
    def make_product(p, n, k):
        '''
        Find all k-element subsets of {1, ..., n} whose product is p.
        Returns: list of lists
        '''
        if n**k < p:
            return []
        if k == 1:
            return [[p]]
        if p%n == 0:
            l = [s + [n] for s in make_product(p//n, n - 1, k - 1)]
        else:
            l = []
        return l + make_product(p, n - 1, k)
    def integral_geometric_mean(n):
        '''
        Find all subsets of {1, ..., n} that contain n and whose
        geometric mean is an integer.
        '''
        f = factorial(n)
        l = [[n]]
        #Find product of distinct prime factors of n
        c = 1
        for p in factorint(n):
            c *= p
        #geometric mean must be a multiple of c
        for gm in range(c, n, c):
            k = 2
            while not (gm**k%n == 0):
                k += 1
            while gm**k <= f:
                l += [s + [n] for s in make_product(gm**k//n, n - 1, k - 1)]
                k += 1
        return l
    def A082553(n):
        return len(integral_geometric_mean(n)) # David Wasserman, Aug 02 2019

Extensions

a(24)-a(62) from Max Alekseyev, Aug 31 2013
a(63)-a(99) from David Wasserman, Aug 02 2019

A326029 Number of strict integer partitions of n whose mean and geometric mean are both integers.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 16 2019

Keywords

Examples

			The a(55) = 2 through a(60) = 9 partitions:
  (55)           (56)         (57)        (58)    (59)  (60)
  (27,16,9,2,1)  (24,18,8,6)  (49,7,1)    (49,9)        (54,6)
                              (27,25,5)   (50,8)        (48,12)
                              (27,18,12)                (27,24,9)
                                                        (27,24,6,2,1)
                                                        (36,12,9,2,1)
                                                        (36,9,6,4,3,2)
                                                        (24,18,9,6,2,1)
                                                        (27,16,9,4,3,1)
		

Crossrefs

Partitions with integer mean and geometric mean are A326641.
Strict partitions with integer mean are A102627.
Strict partitions with integer geometric mean are A326625.
Non-constant partitions with integer mean and geometric mean are A326641.
Subsets with integer mean and geometric mean are A326643.
Heinz numbers of partitions with integer mean and geometric mean are A326645.

Programs

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

Extensions

More terms from Jinyuan Wang, Jun 26 2020

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

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
Previous Showing 11-20 of 21 results. Next