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-10 of 11 results. Next

A326027 Number of nonempty subsets of {1..n} whose geometric mean is an integer.

Original entry on oeis.org

0, 1, 2, 3, 6, 7, 8, 9, 12, 19, 20, 21, 28, 29, 30, 31, 40, 41, 70, 71, 74, 75, 76, 77, 108, 123, 124, 211, 214, 215, 216, 217, 332, 333, 334, 335, 592, 593, 594, 595, 612, 613, 614, 615, 618, 639, 640, 641, 1160, 1183, 1324, 1325, 1328, 1329, 2176, 2177, 2196, 2197, 2198, 2199, 2414, 2415, 2416, 2443, 4000, 4001, 4002, 4003, 4006, 4007, 4008, 4009, 6626, 6627, 6628, 9753, 9756, 9757, 9758, 9759, 11136
Offset: 0

Views

Author

Gus Wiseman, Jul 14 2019

Keywords

Examples

			The a(1) = 1 through a(9) = 19 subsets:
  {1}  {1}  {1}  {1}      {1}      {1}      {1}      {1}      {1}
       {2}  {2}  {2}      {2}      {2}      {2}      {2}      {2}
            {3}  {3}      {3}      {3}      {3}      {3}      {3}
                 {4}      {4}      {4}      {4}      {4}      {4}
                 {1,4}    {5}      {5}      {5}      {5}      {5}
                 {1,2,4}  {1,4}    {6}      {6}      {6}      {6}
                          {1,2,4}  {1,4}    {7}      {7}      {7}
                                   {1,2,4}  {1,4}    {8}      {8}
                                            {1,2,4}  {1,4}    {9}
                                                     {2,8}    {1,4}
                                                     {1,2,4}  {1,9}
                                                     {2,4,8}  {2,8}
                                                              {4,9}
                                                              {1,2,4}
                                                              {1,3,9}
                                                              {2,4,8}
                                                              {3,8,9}
                                                              {4,6,9}
                                                              {3,6,8,9}
		

Crossrefs

First differences are A082553.
Partitions whose geometric mean is an integer are A067539.
Strict partitions whose geometric mean is an integer are A326625.
Subsets whose average is an integer are A051293.

Programs

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

Formula

a(n) = A357413(n) + A357414(n). For a squarefree n, a(n) = a(n-1) + 1. - Max Alekseyev, Mar 01 2025

Extensions

Terms a(57) onward from Max Alekseyev, Mar 01 2025

A326028 Number of factorizations of n into factors > 1 with integer geometric mean.

Original entry on oeis.org

0, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2
Offset: 1

Views

Author

Gus Wiseman, Jul 15 2019

Keywords

Comments

First differs from A294336 and A316782 at a(36) = 5.

Examples

			The a(4) = 2 through a(36) = 5 factorizations (showing only the cases where n is a perfect power).
  (4)    (8)      (9)    (16)       (25)   (27)     (32)         (36)
  (2*2)  (2*2*2)  (3*3)  (2*8)      (5*5)  (3*3*3)  (2*2*2*2*2)  (4*9)
                         (4*4)                                   (6*6)
                         (2*2*2*2)                               (2*18)
                                                                 (3*12)
		

Crossrefs

Positions of terms > 1 are the perfect powers A001597.
Partitions with integer geometric mean are A067539.
Subsets with integer geometric mean are A326027.
Factorizations with integer average and geometric mean are A326647.

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Length[Select[facs[n],IntegerQ[GeometricMean[#]]&]],{n,2,100}]
  • PARI
    A326028(n, m=n, facmul=1, facnum=0) = if(1==n,facnum>0 && ispower(facmul,facnum), my(s=0); fordiv(n, d, if((d>1)&&(d<=m), s += A326028(n/d, d, facmul*d, facnum+1))); (s)); \\ Antti Karttunen, Nov 10 2024

Formula

a(2^n) = A067538(n).

Extensions

a(89) onwards from Antti Karttunen, Nov 10 2024

A326623 Heinz numbers of integer partitions whose geometric mean is an integer.

Original entry on oeis.org

2, 3, 4, 5, 7, 8, 9, 11, 13, 14, 16, 17, 19, 23, 25, 27, 29, 31, 32, 37, 41, 42, 43, 46, 47, 49, 53, 57, 59, 61, 64, 67, 71, 73, 76, 79, 81, 83, 89, 97, 101, 103, 106, 107, 109, 113, 121, 125, 126, 127, 128, 131, 137, 139, 149, 151, 157, 161, 163, 167, 169
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:
    2: {1}
    3: {2}
    4: {1,1}
    5: {3}
    7: {4}
    8: {1,1,1}
    9: {2,2}
   11: {5}
   13: {6}
   14: {1,4}
   16: {1,1,1,1}
   17: {7}
   19: {8}
   23: {9}
   25: {3,3}
   27: {2,2,2}
   29: {10}
   31: {11}
   32: {1,1,1,1,1}
   37: {12}
		

Crossrefs

The enumeration of these partitions by sum is given by A067539.
Heinz numbers of partitions with integer average are A316413.
The case without prime powers is A326624.
Subsets whose geometric mean is an integer are A326027.
Factorizations with integer geometric mean are A326028.

Programs

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

A326625 Number of strict integer partitions of n whose geometric mean is an integer.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 2, 1, 1, 3, 1, 1, 3, 2, 2, 1, 2, 1, 2, 4, 3, 1, 2, 1, 4, 5, 2, 3, 3, 3, 5, 1, 3, 5, 5, 3, 4, 4, 7, 7, 5, 5, 2, 4, 2, 5, 7, 4, 6, 9, 5, 7, 7, 8, 7, 5, 11, 5, 9, 9, 9, 7, 9, 5, 13, 7, 9, 7, 11, 12, 7, 7, 12, 9, 13, 11, 10, 13, 7, 14
Offset: 0

Views

Author

Gus Wiseman, Jul 14 2019

Keywords

Examples

			The a(63) = 9 partitions:
  (63)  (36,18,9)  (54,4,3,2)   (36,18,6,2,1)   (36,9,8,6,3,1)
        (48,12,3)  (27,24,8,4)  (18,16,12,9,8)
                   (32,18,9,4)
The initial terms count the following partitions:
   1: (1)
   2: (2)
   3: (3)
   4: (4)
   5: (5)
   5: (4,1)
   6: (6)
   7: (7)
   7: (4,2,1)
   8: (8)
   9: (9)
  10: (10)
  10: (9,1)
  10: (8,2)
  11: (11)
  12: (12)
  13: (13)
  13: (9,4)
  13: (9,3,1)
  14: (14)
  14: (8,4,2)
  15: (15)
  15: (12,3)
  16: (16)
		

Crossrefs

Partitions whose geometric mean is an integer are A067539.
Strict partitions whose average is an integer are A102627.

Programs

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

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))

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 *)

A326642 Number of non-constant integer partitions of n whose mean and geometric mean are both integers.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 1, 1, 0, 0, 0, 4, 2, 0, 0, 3, 1, 2, 1, 2, 0, 7, 0, 4, 2, 2, 4, 7, 0, 0, 4, 12, 0, 9, 0, 2, 11, 0, 0, 17, 6, 14, 4, 8, 0, 13, 6, 27, 6, 2, 0, 36, 0, 0, 35, 32, 8, 20, 0, 11, 6, 56, 0, 91, 0, 2, 17
Offset: 0

Views

Author

Gus Wiseman, Jul 16 2019

Keywords

Comments

The Heinz numbers of these partitions are given by A326646.

Examples

			The a(30) = 7 partitions:
  (27,3)
  (24,6)
  (24,3,3)
  (16,8,2,2,2)
  (9,9,9,1,1,1)
  (8,8,8,2,2,2)
  (8,8,4,4,1,1,1,1,1,1)
		

Crossrefs

Partitions with integer mean and geometric mean are A326641.
Heinz numbers of non-constant partitions with integer mean and geometric mean are A326646.
Non-constant partitions with integer geometric mean are A326624.

Programs

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

Formula

a(n) = A326641(n) - A000005(n).

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
Showing 1-10 of 11 results. Next