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.

A327778 Number of integer partitions of n whose LCM is a multiple of n.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 2, 1, 1, 1, 5, 1, 11, 1, 11, 23, 1, 1, 23, 1, 85, 85, 45, 1, 152, 1, 84, 1, 451, 1, 1787, 1, 1, 735, 260, 1925, 1908, 1, 437, 1877, 4623, 1, 14630, 1, 6934, 10519, 1152, 1, 6791, 1, 1817, 10159, 22556, 1, 2819, 47927, 69333, 22010, 4310, 1
Offset: 0

Views

Author

Gus Wiseman, Sep 25 2019

Keywords

Examples

			The partitions of n = 6, 10, 12, and 15 whose LCM is a multiple of n:
  (6)      (10)         (12)             (15)
  (3,2,1)  (5,3,2)      (5,4,3)          (6,5,4)
           (5,4,1)      (6,4,2)          (7,5,3)
           (5,2,2,1)    (8,3,1)          (9,5,1)
           (5,2,1,1,1)  (4,3,3,2)        (10,3,2)
                        (4,4,3,1)        (5,4,3,3)
                        (6,4,1,1)        (5,5,3,2)
                        (4,3,2,2,1)      (6,5,2,2)
                        (4,3,3,1,1)      (6,5,3,1)
                        (4,3,2,1,1,1)    (10,3,1,1)
                        (4,3,1,1,1,1,1)  (5,3,3,2,2)
                                         (5,3,3,3,1)
                                         (5,4,3,2,1)
                                         (5,5,3,1,1)
                                         (6,5,2,1,1)
                                         (5,3,2,2,2,1)
                                         (5,3,3,2,1,1)
                                         (5,4,3,1,1,1)
                                         (6,5,1,1,1,1)
                                         (5,3,2,2,1,1,1)
                                         (5,3,3,1,1,1,1)
                                         (5,3,2,1,1,1,1,1)
                                         (5,3,1,1,1,1,1,1,1)
		

Crossrefs

The Heinz numbers of these partitions are given by A327783.
Partitions whose LCM is equal to their sum are A074761.
Partitions whose LCM is greater than their sum are A327779.
Partitions whose LCM is less than their sum are A327781.

Programs

  • Maple
    a:= proc(m) option remember; local b; b:=
          proc(n, i, l) option remember; `if`(n=0 or i=1,
            `if`(l=m, 1, 0), `if`(i<2, 0, b(n, i-1, l))+
             b(n-i, min(n-i, i), igcd(m, ilcm(l, i))))
          end; `if`(isprime(m), 1, b(m$2, 1))
        end:
    seq(a(n), n=0..60);  # Alois P. Heinz, Sep 26 2019
  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Divisible[LCM@@#,n]&]],{n,30}]
    (* Second program: *)
    a[m_] := a[m] = Module[{b}, b[n_, i_, l_] := b[n, i, l] = If[n == 0 || i == 1, If[l == m, 1, 0], If[i<2, 0, b[n, i - 1, l]] + b[n - i, Min[n - i, i], GCD[m, LCM[l, i]]]]; If[PrimeQ[m], 1, b[m, m, 1]]];
    a /@ Range[0, 60] (* Jean-François Alcover, May 18 2021, after Alois P. Heinz *)

Formula

a(n) = 1 <=> n in { A000961 }. - Alois P. Heinz, Sep 26 2019

A327781 Number of integer partitions of n whose LCM is less than n.

Original entry on oeis.org

0, 0, 1, 2, 4, 5, 9, 12, 18, 22, 30, 37, 52, 69, 89, 110, 143, 163, 204, 243, 298, 374, 451, 516, 620, 790, 932, 1064, 1243, 1454, 1699, 2365, 2733, 3071, 3524, 3945, 4526, 5600, 6361, 7111, 8057, 9405, 10621, 12836, 14395, 16066, 18047, 19860, 22143, 25748
Offset: 0

Views

Author

Gus Wiseman, Sep 25 2019

Keywords

Examples

			The a(2) = 1 through a(8) = 18 partitions:
  (11)  (21)   (22)    (41)     (33)      (61)       (44)
        (111)  (31)    (221)    (42)      (322)      (62)
               (211)   (311)    (51)      (331)      (71)
               (1111)  (2111)   (222)     (421)      (332)
                       (11111)  (411)     (511)      (422)
                                (2211)    (2221)     (611)
                                (3111)    (3211)     (2222)
                                (21111)   (4111)     (3221)
                                (111111)  (22111)    (3311)
                                          (31111)    (4211)
                                          (211111)   (5111)
                                          (1111111)  (22211)
                                                     (32111)
                                                     (41111)
                                                     (221111)
                                                     (311111)
                                                     (2111111)
                                                     (11111111)
		

Crossrefs

The Heinz numbers of these partitions are given by A327776.
Partitions whose LCM is equal to their sum are A074761.
Partitions whose LCM is greater than their sum are A327779.

Programs

  • Maple
    a:= proc(m) option remember; local b; b:=
          proc(n, i, l) option remember; `if`(n=0, 1,
           `if`(i>1, b(n, i-1, l), 0) +(h-> `if`(h0, b(m$2, 1), 0)
        end:
    seq(a(n), n=0..70);  # Alois P. Heinz, Oct 10 2019
  • Mathematica
    Table[Length[Select[IntegerPartitions[n],LCM@@#1, b[n, i - 1, l], 0] + Function[h, If[h0, b[m, m, 1], 0]];
    a /@ Range[0, 70] (* Jean-François Alcover, May 18 2021, after Alois P. Heinz *)
  • PARI
    b(m,n)={my(d=divisors(m)); polcoef(1/prod(i=1, #d, 1 - x^d[i] + O(x*x^n)), n)}
    a(n)={sum(m=1, n-1, b(m, n)*sum(i=1, (n-1)\m, moebius(i)))} \\ Andrew Howroyd, Oct 09 2019

A327783 Heinz numbers of integer partitions whose LCM is a multiple of their sum.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 30, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 154, 157, 163, 165, 167, 173, 179, 181, 190, 191, 193, 197, 198, 199, 211, 223, 227, 229, 233, 239, 241
Offset: 1

Views

Author

Gus Wiseman, Sep 25 2019

Keywords

Comments

First differs from A319333 in having 154.
First nonsquarefree term is 198.
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}
    5: {3}
    7: {4}
   11: {5}
   13: {6}
   17: {7}
   19: {8}
   23: {9}
   29: {10}
   30: {1,2,3}
   31: {11}
   37: {12}
   41: {13}
   43: {14}
   47: {15}
   53: {16}
   59: {17}
   61: {18}
   67: {19}
		

Crossrefs

The enumeration of these partitions by sum is A327778.
Heinz numbers of partitions whose LCM is twice their sum are A327775.
Heinz numbers of partitions whose LCM is less than their sum are A327776.
Heinz numbers of partitions whose LCM is greater than their sum are A327784.

Programs

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

Formula

A056239(a(k)) | A290103(a(k)).

A330225 Position of first appearance of n in A290103 = LCM of prime indices.

Original entry on oeis.org

1, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 35, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271
Offset: 1

Views

Author

Gus Wiseman, Mar 26 2020

Keywords

Comments

Appears to be the prime numbers (A000040) with 2 replaced by 1 and 37 replaced by 35.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Crossrefs

The version for product instead of lcm is A318871
The version for standard compositions is A333225.
The version for binary indices is A333492.
Let q(k) be the prime indices of k:
- The product of q(k) is A003963(k).
- The sum of q(k) is A056239(k).
- The terms of q(k) are row k of A112798.
- The GCD of q(k) is A289508(k).
- The LCM of q(k) is A290103(k).
- The LCM of q(k) + 1 is A328219(k).

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    q=Table[If[n==1,1,LCM@@primeMS[n]],{n,100}];
    Table[Position[q,i][[1,1]],{i,First[Split[Union[q],#1+1==#2&]]}]

A319329 Heinz numbers of integer partitions, whose length is equal to the GCD of the parts and whose sum is equal to the LCM of the parts, in increasing order.

Original entry on oeis.org

2, 1495, 179417, 231133, 727531, 1378583, 1787387, 3744103, 4556993, 7566167, 18977519, 29629391, 30870587, 34174939, 39973571, 53508983, 70946617, 110779141, 138820187, 139681069, 170583017, 225817751, 409219217, 441317981, 493580417, 539462099, 544392433, 712797613, 802903541
Offset: 1

Views

Author

Gus Wiseman, Sep 17 2018

Keywords

Comments

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

Examples

			The corresponding sequence of partitions, whose length is equal to their GCD and whose sum is equal to their LCM: (1), (9,6,3), (20,8,8,4), (24,16,4,4), (16,16,12,4).
		

Crossrefs

Programs

  • Mathematica
    Select[Range[2,10000],With[{m=If[#==1,{},Flatten[Cases[FactorInteger[#],{p_,k_}:>Table[PrimePi[p],{k}]]]]},And[LCM@@m==Total[m],GCD@@m==Length[m]]]&]

Extensions

More terms from Max Alekseyev, Jul 25 2024

A319330 Number of integer partitions of n whose length is equal to the GCD of the parts and whose sum is equal to the LCM of the parts.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 1, 0, 1, 0, 3, 0, 0, 0, 0, 2
Offset: 1

Views

Author

Gus Wiseman, Sep 17 2018

Keywords

Examples

			A list of all such partitions begins (1), (9,6,3), (20,8,8,4), (24,16,4,4), (16,16,12,4), (16,12,12,8), (25,10,5,5,5), (20,15,15,5,5), (20,15,10,10,5).
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],And[LCM@@#==Total[#],GCD@@#==Length[#]]&]],{n,30}]

Extensions

a(71)-a(105) from Alois P. Heinz, Sep 18 2018

A319334 Nonprime Heinz numbers of integer partitions whose sum is equal to their LCM.

Original entry on oeis.org

30, 198, 264, 273, 364, 490, 525, 630, 700, 840, 918, 1120, 1224, 1495, 1632, 1794, 2392, 2420, 2750, 3105, 3450, 3726, 4140, 4263, 4400, 4466, 4921, 4968, 5481, 5520, 5684, 6327, 6624, 7030, 7040, 7308, 8436, 8832, 9744, 11248, 12992, 14079, 14450, 14993
Offset: 1

Views

Author

Gus Wiseman, Sep 17 2018

Keywords

Comments

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

Examples

			The sequence of all non-singleton integer partitions whose sum is equal to their LCM begins: (321), (5221), (52111), (642), (6411), (4431), (4332), (43221), (43311), (432111), (72221), (4311111), (722111), (963), (7211111), (9621).
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[2,1000],And[!PrimeQ[#],LCM@@primeMS[#]==Total[primeMS[#]]]&]

A349152 Standard composition numbers of compositions into divisors. Numbers k such that all parts of the k-th composition in standard order are divisors of the sum of parts.

Original entry on oeis.org

0, 1, 2, 3, 4, 7, 8, 10, 11, 13, 14, 15, 16, 31, 32, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63, 64, 127, 128, 136, 138, 139, 141, 142, 143, 162, 163, 168, 170, 171, 173, 174, 175, 177, 181, 182, 183, 184
Offset: 1

Views

Author

Gus Wiseman, Nov 15 2021

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 and corresponding compositions begin:
      0: ()              36: (3,3)           54: (1,2,1,2)
      1: (1)             37: (3,2,1)         55: (1,2,1,1,1)
      2: (2)             38: (3,1,2)         57: (1,1,3,1)
      3: (1,1)           39: (3,1,1,1)       58: (1,1,2,2)
      4: (3)             41: (2,3,1)         59: (1,1,2,1,1)
      7: (1,1,1)         42: (2,2,2)         60: (1,1,1,3)
      8: (4)             43: (2,2,1,1)       61: (1,1,1,2,1)
     10: (2,2)           44: (2,1,3)         62: (1,1,1,1,2)
     11: (2,1,1)         45: (2,1,2,1)       63: (1,1,1,1,1,1)
     13: (1,2,1)         46: (2,1,1,2)       64: (7)
     14: (1,1,2)         47: (2,1,1,1,1)    127: (1,1,1,1,1,1,1)
     15: (1,1,1,1)       50: (1,3,2)        128: (8)
     16: (5)             51: (1,3,1,1)      136: (4,4)
     31: (1,1,1,1,1)     52: (1,2,3)        138: (4,2,2)
     32: (6)             53: (1,2,2,1)      139: (4,2,1,1)
		

Crossrefs

Looking at length instead of parts gives A096199.
These composition are counted by A100346.
A version counting subsets instead of compositions is A125297.
An unordered version is A326841, counted by A018818.
A011782 counts compositions.
A316413 ranks partitions with sum divisible by length, counted by A067538.
A319333 ranks partitions with sum equal to lcm, counted by A074761.
Statistics of standard compositions:
- The compositions themselves are the rows of A066099.
- Number of parts is given by A000120, distinct A334028.
- Sum and product of parts are given by A070939 and A124758.
- Maximum and minimum parts are given by A333766 and A333768.
Classes of standard compositions:
- Partitions and strict partitions are ranked by A114994 and A333256.
- Multisets and sets are ranked by A225620 and A333255.
- Strict and constant compositions are ranked by A233564 and A272919.
- Permutations are ranked by A333218.
- Relatively prime compositions are ranked by A291166*, complement A291165.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,100],#==0||Divisible[Total[stc[#]],LCM@@stc[#]]&]
Showing 1-8 of 8 results.