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

A304709 Number of integer partitions of n whose distinct parts are pairwise coprime.

Original entry on oeis.org

1, 1, 2, 3, 6, 7, 13, 16, 23, 29, 42, 49, 69, 83, 102, 126, 161, 191, 239, 281, 336, 402, 484, 566, 672, 787, 919, 1067, 1251, 1449, 1684, 1934, 2223, 2554, 2920, 3341, 3821, 4344, 4928, 5586, 6334, 7163, 8091, 9100, 10228, 11492, 12902, 14449, 16167, 18058
Offset: 1

Views

Author

Gus Wiseman, May 17 2018

Keywords

Comments

Two parts are coprime if they have no common divisor greater than 1. For partitions of length 1 note that (1) is coprime but (x) is not coprime for x > 1.

Examples

			The a(6) = 7 integer partitions of 6 whose distinct parts are pairwise coprime are (51), (411), (321), (3111), (2211), (21111), (111111).
		

Crossrefs

Programs

  • Mathematica
    Table[Select[IntegerPartitions[n],CoprimeQ@@Union[#]&]//Length,{n,20}]
  • PARI
    lista(nn)={local(Cache=Map());
      my(excl=vector(nn, n, sum(i=1, n-1, if(gcd(i,n)>1, 2^(n-i)))));
      my(c(n, m, b)=
         if(n==0, 1,
            while(m>n || bittest(b,0), m--; b>>=1);
            my(hk=[n, m, b], z);
            if(!mapisdefined(Cache, hk, &z),
              z = if(m, self()(n, m-1, b>>1) + self()(n-m, m, bitor(b, excl[m])), 0);
              mapput(Cache, hk, z)); z));
      my(a(n)=c(n, n, 0) + 1 - numdiv(n));
      for(n=1, nn, print1(a(n), ", "))
    } \\ Andrew Howroyd, Nov 02 2019

Formula

a(n) = A304712(n) + 1 - A000005(n). - Andrew Howroyd, Nov 02 2019

A337601 Number of unordered triples of positive integers summing to n whose set of distinct parts is pairwise coprime, where a singleton is not considered coprime unless it is (1).

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 2, 3, 4, 4, 5, 6, 8, 7, 10, 7, 11, 11, 17, 12, 19, 12, 19, 17, 29, 16, 28, 19, 31, 23, 46, 23, 42, 25, 45, 27, 59, 31, 57, 34, 61, 37, 84, 38, 75, 42, 74, 47, 107, 45, 98, 51, 96, 56, 135, 54, 115, 63, 117, 67, 174, 65, 139, 75, 144, 75, 194
Offset: 0

Views

Author

Gus Wiseman, Sep 20 2020

Keywords

Comments

First differs from A337600 at a(9) = 4, A337600(9) = 5.

Examples

			The a(3) = 1 through a(14) = 10 partitions (A = 10, B = 11, C = 12):
  111  211  221  321  322  332  441  433  443  543  544  554
            311  411  331  431  522  532  533  552  553  743
                      511  521  531  541  551  651  661  752
                           611  711  721  722  732  733  761
                                     811  731  741  751  833
                                          911  831  922  851
                                               921  B11  941
                                               A11       A31
                                                         B21
                                                         C11
		

Crossrefs

A014612 intersected with A304711 ranks these partitions.
A220377 is the strict case.
A304709 counts these partitions of any length.
A307719 is the strict case except for any number of 1's.
A337600 considers singletons to be coprime.
A337603 is the ordered version.
A000217 counts 3-part compositions.
A000837 counts relatively prime partitions.
A001399/A069905/A211540 count 3-part partitions.
A023023 counts relatively prime 3-part partitions.
A051424 counts pairwise coprime or singleton partitions.
A101268 counts pairwise coprime or singleton compositions.
A305713 counts pairwise coprime strict partitions.
A327516 counts pairwise coprime partitions.
A333227 ranks pairwise coprime compositions.
A333228 ranks compositions whose distinct parts are pairwise coprime.
A337461 counts pairwise coprime 3-part compositions.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n,{3}],CoprimeQ@@Union[#]&]],{n,0,100}]

Formula

For n > 0, a(n) = A337600(n) - A079978(n).

A337665 Number of compositions of n whose distinct parts are pairwise coprime, where a singleton is not considered coprime unless it is (1).

Original entry on oeis.org

0, 1, 1, 3, 6, 15, 27, 57, 108, 208, 393, 749, 1415, 2687, 5076, 9583, 18088, 34156, 64511, 121898, 230368, 435460, 823376, 1557420, 2946931, 5578109, 10561987, 20005126, 37902509, 71832372, 136173266, 258211602, 489738622, 929074445, 1762899107, 3345713031
Offset: 0

Views

Author

Gus Wiseman, Sep 22 2020

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n.

Examples

			The a(1) = 1 through a(5) = 15 compositions:
  (1)  (1,1)  (1,2)    (1,3)      (1,4)
              (2,1)    (3,1)      (2,3)
              (1,1,1)  (1,1,2)    (3,2)
                       (1,2,1)    (4,1)
                       (2,1,1)    (1,1,3)
                       (1,1,1,1)  (1,2,2)
                                  (1,3,1)
                                  (2,1,2)
                                  (2,2,1)
                                  (3,1,1)
                                  (1,1,1,2)
                                  (1,1,2,1)
                                  (1,2,1,1)
                                  (2,1,1,1)
                                  (1,1,1,1,1)
		

Crossrefs

A000740 is a relatively prime instead of pairwise coprime version.
A304709 is the unordered version.
A333228 ranks these compositions.
A337561 is the strict case.
A337603 is the length-3 case.
A337664 considers all singletons to be coprime.
A051424 counts pairwise coprime or singleton partitions.
A101268 counts pairwise coprime or singleton compositions.
A305713 counts pairwise coprime strict partitions.
A327516 counts pairwise coprime partitions.
A333227 ranks pairwise coprime compositions.
A337461 counts pairwise coprime length-3 compositions.

Programs

  • Mathematica
    Table[Length[Join@@Permutations/@Select[IntegerPartitions[n],CoprimeQ@@Union[#]&]],{n,0,15}]

Extensions

a(26)-a(35) from Alois P. Heinz, Sep 29 2020

A337602 Number of ordered triples of positive integers summing to n whose set of distinct parts is pairwise coprime, where a singleton is always considered coprime.

Original entry on oeis.org

0, 0, 0, 1, 3, 6, 10, 9, 18, 16, 24, 21, 43, 24, 51, 31, 54, 42, 94, 45, 102, 55, 99, 69, 163, 66, 150, 88, 168, 96, 265, 93, 228, 121, 246, 126, 337, 132, 315, 169, 342, 162, 487, 165, 420, 217, 411, 213, 619, 207, 558, 259, 540, 258, 784, 264, 654, 325, 660
Offset: 0

Views

Author

Gus Wiseman, Sep 20 2020

Keywords

Examples

			The a(3) = 1 through a(8) = 18 triples:
  (1,1,1)  (1,1,2)  (1,1,3)  (1,1,4)  (1,1,5)  (1,1,6)
           (1,2,1)  (1,2,2)  (1,2,3)  (1,3,3)  (1,2,5)
           (2,1,1)  (1,3,1)  (1,3,2)  (1,5,1)  (1,3,4)
                    (2,1,2)  (1,4,1)  (2,2,3)  (1,4,3)
                    (2,2,1)  (2,1,3)  (2,3,2)  (1,5,2)
                    (3,1,1)  (2,2,2)  (3,1,3)  (1,6,1)
                             (2,3,1)  (3,2,2)  (2,1,5)
                             (3,1,2)  (3,3,1)  (2,3,3)
                             (3,2,1)  (5,1,1)  (2,5,1)
                             (4,1,1)           (3,1,4)
                                               (3,2,3)
                                               (3,3,2)
                                               (3,4,1)
                                               (4,1,3)
                                               (4,3,1)
                                               (5,1,2)
                                               (5,2,1)
                                               (6,1,1)
		

Crossrefs

The complement in A014311 of A337695 ranks these compositions.
A220377*6 is the strict case.
A337600 is the unordered version.
A337603 does not consider a singleton to be coprime unless it is (1).
A337664 counts these compositions of any length.
A000740 counts relatively prime compositions.
A337561 counts pairwise coprime strict compositions.
A000217 counts 3-part compositions.
A001399/A069905/A211540 count 3-part partitions.
A023023 counts relatively prime 3-part partitions.
A051424 counts pairwise coprime or singleton partitions.
A101268 counts pairwise coprime or singleton compositions.
A305713 counts pairwise coprime strict partitions.
A327516 counts pairwise coprime partitions.
A333227 ranks pairwise coprime compositions.
A333228 ranks compositions whose distinct parts are pairwise coprime.
A337461 counts pairwise coprime 3-part compositions.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n,{3}],SameQ@@#||CoprimeQ@@Union[#]&]],{n,0,100}]

A337600 Number of unordered triples of positive integers summing to n whose set of distinct parts is pairwise coprime, where a singleton is always considered coprime.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 3, 3, 4, 5, 5, 6, 9, 7, 10, 8, 11, 11, 18, 12, 19, 13, 19, 17, 30, 16, 28, 20, 31, 23, 47, 23, 42, 26, 45, 27, 60, 31, 57, 35, 61, 37, 85, 38, 75, 43, 74, 47, 108, 45, 98, 52, 96, 56, 136, 54, 115, 64, 117, 67, 175, 65, 139, 76, 144, 75, 195
Offset: 0

Views

Author

Gus Wiseman, Sep 20 2020

Keywords

Comments

First differs from A337601 at a(9) = 5, A337601(9) = 4.

Examples

			The a(3) = 1 through a(14) = 10 partitions (A = 10, B = 11, C = 12):
  111  211  221  222  322  332  333  433  443  444  544  554
            311  321  331  431  441  532  533  543  553  743
                 411  511  521  522  541  551  552  661  752
                           611  531  721  722  651  733  761
                                711  811  731  732  751  833
                                          911  741  922  851
                                               831  B11  941
                                               921       A31
                                               A11       B21
                                                         C11
		

Crossrefs

A220377 is the strict case.
A304712 counts these partitions of any length.
A307719 is the strict case except for any number of 1's.
A337601 does not consider a singleton to be coprime unless it is (1).
A337602 is the ordered version.
A337664 counts compositions of this type and any length.
A000217 counts 3-part compositions.
A000837 counts relatively prime partitions.
A001399/A069905/A211540 count 3-part partitions.
A023023 counts relatively prime 3-part partitions.
A051424 counts pairwise coprime or singleton partitions.
A101268 counts pairwise coprime or singleton compositions.
A304709 counts partitions whose distinct parts are pairwise coprime.
A305713 counts pairwise coprime strict partitions.
A327516 counts pairwise coprime partitions.
A333227 ranks pairwise coprime compositions.
A333228 ranks compositions whose distinct parts are pairwise coprime.
A337461 counts pairwise coprime length-3 compositions.
A337563 counts pairwise coprime length-3 partitions with no 1's.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n,{3}],SameQ@@#||CoprimeQ@@Union[#]&]],{n,0,100}]

Formula

For n > 0, a(n) = A337601(n) + A079978(n).

A337664 Number of compositions of n whose set of distinct parts is pairwise coprime, where a singleton is always considered coprime.

Original entry on oeis.org

1, 1, 2, 4, 8, 16, 30, 58, 111, 210, 396, 750, 1420, 2688, 5079, 9586, 18092, 34157, 64516, 121899, 230373, 435463, 823379, 1557421, 2946938, 5578111, 10561990, 20005129, 37902514, 71832373, 136173273, 258211603, 489738627, 929074448, 1762899110, 3345713034
Offset: 0

Views

Author

Gus Wiseman, Sep 21 2020

Keywords

Examples

			The a(0) = 1 through a(5) = 16 compositions:
  ()  (1)  (2)   (3)    (4)     (5)
           (11)  (12)   (13)    (14)
                 (21)   (22)    (23)
                 (111)  (31)    (32)
                        (112)   (41)
                        (121)   (113)
                        (211)   (122)
                        (1111)  (131)
                                (212)
                                (221)
                                (311)
                                (1112)
                                (1121)
                                (1211)
                                (2111)
                                (11111)
		

Crossrefs

A304712 is the unordered version.
A337562 is the strict case.
A337602 is the length-3 case.
A337665 does not consider a singleton to be coprime unless it is (1).
A337695 ranks the complement of these compositions.
A000740 counts relatively prime compositions.
A051424 counts pairwise coprime or singleton partitions.
A101268 counts pairwise coprime or singleton compositions.
A305713 counts pairwise coprime strict partitions.
A327516 counts pairwise coprime partitions.
A333227 ranks pairwise coprime compositions.
A333228 ranks compositions whose distinct parts are pairwise coprime.
A337461 counts pairwise coprime length-3 compositions.
A337561 counts pairwise coprime strict compositions.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],SameQ@@#||CoprimeQ@@Union[#]&]],{n,0,15}]

A337695 Numbers k such that the distinct parts of the k-th composition in standard order (A066099) are not pairwise coprime, where a singleton is always considered coprime.

Original entry on oeis.org

34, 40, 69, 70, 81, 88, 98, 104, 130, 138, 139, 141, 142, 160, 162, 163, 168, 177, 184, 197, 198, 209, 216, 226, 232, 260, 261, 262, 274, 276, 277, 278, 279, 282, 283, 285, 286, 288, 290, 296, 321, 324, 325, 326, 327, 328, 337, 344, 352, 354, 355, 360, 369
Offset: 1

Views

Author

Gus Wiseman, Sep 22 2020

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 sequence together with the corresponding compositions begins:
     34: (4,2)        163: (2,4,1,1)    277: (4,2,2,1)
     40: (2,4)        168: (2,2,4)      278: (4,2,1,2)
     69: (4,2,1)      177: (2,1,4,1)    279: (4,2,1,1,1)
     70: (4,1,2)      184: (2,1,1,4)    282: (4,1,2,2)
     81: (2,4,1)      197: (1,4,2,1)    283: (4,1,2,1,1)
     88: (2,1,4)      198: (1,4,1,2)    285: (4,1,1,2,1)
     98: (1,4,2)      209: (1,2,4,1)    286: (4,1,1,1,2)
    104: (1,2,4)      216: (1,2,1,4)    288: (3,6)
    130: (6,2)        226: (1,1,4,2)    290: (3,4,2)
    138: (4,2,2)      232: (1,1,2,4)    296: (3,2,4)
    139: (4,2,1,1)    260: (6,3)        321: (2,6,1)
    141: (4,1,2,1)    261: (6,2,1)      324: (2,4,3)
    142: (4,1,1,2)    262: (6,1,2)      325: (2,4,2,1)
    160: (2,6)        274: (4,3,2)      326: (2,4,1,2)
    162: (2,4,2)      276: (4,2,3)      327: (2,4,1,1,1)
		

Crossrefs

A304712 counts the complement, with ordered version A337664.
A333228 ranks compositions whose distinct parts are pairwise coprime.
A335238 does not consider a singleton coprime unless it is (1).
A337600 counts 3-part partitions in the complement.
A000740 counts relatively prime compositions.
A051424 counts pairwise coprime or singleton partitions.
A101268 counts pairwise coprime or singleton compositions.
A327516 counts pairwise coprime partitions.
A333227 ranks pairwise coprime compositions.
A337461 counts pairwise coprime 3-part compositions.
A337561 counts pairwise coprime strict compositions.
A337665 counts compositions whose distinct parts are pairwise coprime.
A337666 ranks pairwise non-coprime compositions.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,100],!(SameQ@@stc[#]||CoprimeQ@@Union[stc[#]])&]

A338331 Numbers whose set of distinct prime indices (A304038) is pairwise coprime, where a singleton is always considered coprime.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 40, 41, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 58, 59, 60, 61, 62, 64, 66, 67, 68, 69, 70, 71, 72, 73
Offset: 1

Views

Author

Gus Wiseman, Oct 31 2020

Keywords

Comments

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.
Also Heinz numbers of partitions whose set of distinct parts is a singleton or pairwise coprime. The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k), giving a bijective correspondence between positive integers and integer partitions.

Examples

			The sequence of terms together with their prime indices begins:
      1: {}          16: {1,1,1,1}     32: {1,1,1,1,1}
      2: {1}         17: {7}           33: {2,5}
      3: {2}         18: {1,2,2}       34: {1,7}
      4: {1,1}       19: {8}           35: {3,4}
      5: {3}         20: {1,1,3}       36: {1,1,2,2}
      6: {1,2}       22: {1,5}         37: {12}
      7: {4}         23: {9}           38: {1,8}
      8: {1,1,1}     24: {1,1,1,2}     40: {1,1,1,3}
      9: {2,2}       25: {3,3}         41: {13}
     10: {1,3}       26: {1,6}         43: {14}
     11: {5}         27: {2,2,2}       44: {1,1,5}
     12: {1,1,2}     28: {1,1,4}       45: {2,2,3}
     13: {6}         29: {10}          46: {1,9}
     14: {1,4}       30: {1,2,3}       47: {15}
     15: {2,3}       31: {11}          48: {1,1,1,1,2}
		

Crossrefs

A302798 is the squarefree case.
A304709 counts partitions with pairwise coprime distinct parts, with ordered version A337665 and Heinz numbers A304711.
A304711 does not consider singletons relatively prime, except for (1).
A304712 counts the partitions with these Heinz numbers.
A316476 is the version for indivisibility instead of relative primality.
A328867 is the pairwise non-coprime instead of pairwise coprime version.
A337600 counts triples of this type, with ordered version A337602.
A338330 is the complement.
A000961 lists powers of primes.
A051424 counts pairwise coprime or singleton partitions.
A304038 gives the distinct prime indices of each positive integer.
A327516 counts pairwise coprime partitions.
A333228 ranks compositions whose distinct parts are pairwise coprime.

Programs

  • Mathematica
    Select[Range[100],#==1||PrimePowerQ[#]||CoprimeQ@@PrimePi/@First/@FactorInteger[#]&]

Formula

Equals A304711 \/ A000961.

A338317 Number of integer partitions of n with no 1's and pairwise coprime distinct parts, where a singleton is always considered coprime.

Original entry on oeis.org

1, 0, 1, 1, 2, 2, 3, 4, 5, 6, 7, 11, 11, 16, 16, 19, 25, 32, 34, 44, 46, 53, 66, 80, 88, 101, 116, 132, 150, 180, 204, 229, 254, 287, 331, 366, 426, 473, 525, 584, 662, 742, 835, 922, 1013, 1128, 1262, 1408, 1555, 1711, 1894, 2080, 2297, 2555, 2806, 3064, 3376
Offset: 0

Views

Author

Gus Wiseman, Oct 24 2020

Keywords

Examples

			The a(2) = 1 through a(12) = 11 partitions (A = 10, B = 11, C = 12):
  2   3   4    5    6     7     8      9      A       B       C
          22   32   33    43    44     54     55      65      66
                    222   52    53     72     73      74      75
                          322   332    333    433     83      444
                                2222   522    532     92      543
                                       3222   3322    443     552
                                              22222   533     732
                                                      722     3333
                                                      3332    5322
                                                      5222    33222
                                                      32222   222222
		

Crossrefs

A007359 (A302568) gives the strict case.
A101268 (A335235) gives pairwise coprime or singleton compositions.
A200976 (A338318) gives the pairwise non-coprime instead of coprime version.
A304709 (A304711) gives partitions whose distinct parts are pairwise coprime, with strict case A305713 (A302797).
A304712 (A338331) allows 1's, with strict version A007360 (A302798).
A327516 (A302696) gives pairwise coprime partitions.
A328673 (A328867) gives partitions with no distinct relatively prime parts.
A338315 (A337987) does not consider singletons coprime.
A338317 (A338316) gives these partitions.
A337462 (A333227) gives pairwise coprime compositions.
A337485 (A337984) gives pairwise coprime integer partitions with no 1's.
A337665 (A333228) gives compositions with pairwise coprime distinct parts.
A337667 (A337666) gives pairwise non-coprime compositions.
A337697 (A022340 /\ A333227) = pairwise coprime compositions with no 1's.
A337983 (A337696) gives pairwise non-coprime strict compositions, with unordered version A318717 (A318719).

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],!MemberQ[#,1]&&(SameQ@@#||CoprimeQ@@Union[#])&]],{n,0,15}]

Formula

The Heinz numbers of these partitions are given by A338316. The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k), giving a bijective correspondence between positive integers and integer partitions.

A338553 Number of integer partitions of n that are either constant or relatively prime.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 10, 15, 20, 29, 37, 56, 68, 101, 122, 170, 213, 297, 352, 490, 587, 778, 948, 1255, 1488, 1953, 2337, 2983, 3585, 4565, 5393, 6842, 8123, 10088, 12015, 14865, 17534, 21637, 25527, 31085, 36701, 44583, 52262, 63261, 74175, 88936, 104305, 124754
Offset: 0

Views

Author

Gus Wiseman, Nov 03 2020

Keywords

Comments

The Heinz numbers of these partitions are given by A338555 = A000961 \/ A289509. The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k), giving a bijective correspondence between positive integers and integer partitions.

Examples

			The a(1) = 1 through a(7) = 15 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)
       (11)  (21)   (22)    (32)     (33)      (43)
             (111)  (31)    (41)     (51)      (52)
                    (211)   (221)    (222)     (61)
                    (1111)  (311)    (321)     (322)
                            (2111)   (411)     (331)
                            (11111)  (2211)    (421)
                                     (3111)    (511)
                                     (21111)   (2221)
                                     (111111)  (3211)
                                               (4111)
                                               (22111)
                                               (31111)
                                               (211111)
                                               (1111111)
		

Crossrefs

A023022(n) + A059841(n) is the 2-part version.
A078374(n) + 1 is the strict case (n > 1).
A338554 counts the complement, with Heinz numbers A338552.
A338555 gives the Heinz numbers of these partitions.
A000005 counts constant partitions, with Heinz numbers A000961.
A000837 counts relatively prime partitions, with Heinz numbers A289509.
A282750 counts relatively prime partitions by sum and length.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],SameQ@@#||GCD@@#==1&]],{n,0,30}]

Formula

For n > 0, a(n) = A000005(n) + A000837(n) - 1.
Showing 1-10 of 11 results. Next