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

A328220 Number of strict integer partitions of n with no pair of consecutive parts relatively prime.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 3, 1, 5, 1, 5, 4, 6, 3, 10, 3, 11, 7, 12, 3, 19, 5, 18, 12, 23, 9, 36, 11, 33, 21, 40, 20, 58, 19, 58, 35, 70, 31, 98, 36, 101, 65, 112, 56, 155, 64, 164, 97, 188, 88, 250, 112, 256, 157, 293, 145, 392, 163, 399, 241, 461, 242
Offset: 0

Views

Author

Gus Wiseman, Oct 14 2019

Keywords

Examples

			The a(2) = 1 through a(20) = 11 partitions (A..K = 10..20):
  2  3  4  5  6   7  8   9   A   B  C    D  E    F   G    H    I    J    K
              42     62  63  64     84      86   96  A6   863  A8   964  C8
                             82     93      A4   A5  C4   962  C6   A63  E6
                                    A2      C2   C3  E2        E4        F5
                                    642     842      862       F3        G4
                                                     A42       G2        I2
                                                               864       A64
                                                               963       A82
                                                               A62       C62
                                                               C42       E42
                                                                         8642
		

Crossrefs

The non-strict case is A328187.
Partitions with all consecutive parts relatively prime are A328172, with strict case A328188.
Strict partitions with relatively prime parts are A078374.
Partitions with no consecutive divisibilities are A328171.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&!MatchQ[#,{_,x_,y_,_}/;GCD[x,y]==1]&]],{n,0,30}]

A303282 Numbers whose prime indices have no common divisor other than 1 but are not pairwise coprime.

Original entry on oeis.org

18, 36, 42, 45, 50, 54, 72, 75, 78, 84, 90, 98, 99, 100, 105, 108, 114, 126, 130, 135, 144, 150, 153, 156, 162, 168, 174, 175, 180, 182, 195, 196, 198, 200, 207, 210, 216, 222, 225, 228, 230, 231, 234, 242, 245, 250, 252, 258, 260, 266, 270, 275, 279, 285, 288
Offset: 1

Views

Author

Gus Wiseman, Apr 20 2018

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. Two or more numbers are coprime if no pair of them has a common divisor other than 1.
The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			The sequence of integer partitions whose Heinz numbers belong to this sequence begins (221), (2211), (421), (322), (331), (2221), (22111), (332), (621), (4211), (3221), (441), (522), (3311), (432), (22211).
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[400],!CoprimeQ@@primeMS[#]&&GCD@@primeMS[#]===1&]

A304712 Number of integer partitions of n whose parts are all equal or whose distinct parts are pairwise coprime.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 10, 14, 19, 25, 32, 43, 54, 70, 86, 105, 130, 162, 196, 240, 286, 339, 405, 485, 573, 674, 790, 922, 1072, 1252, 1456, 1685, 1939, 2226, 2557, 2923, 3349, 3822, 4347, 4931, 5593, 6335, 7170, 8092, 9105, 10233, 11495, 12903, 14458, 16169, 18063
Offset: 0

Views

Author

Gus Wiseman, May 17 2018

Keywords

Comments

Two parts are coprime if they have no common divisor greater than 1.

Examples

			The a(6) = 10 partitions whose parts are all equal or whose distinct parts are pairwise coprime are (6), (51), (411), (33), (321), (3111), (222), (2211), (21111), (111111).
		

Crossrefs

Programs

  • Maple
    g:= proc(n, i, s) `if`(n=0, 1, `if`(i<1, 0,
          b(n, i, select(x-> x<=i, s))))
        end:
    b:= proc(n, i, s) option remember; g(n, i-1, s)+(f->
         `if`(f intersect s={}, add(g(n-i*j, i-1, s union f)
            , j=1..n/i), 0))(numtheory[factorset](i))
        end:
    a:= n-> g(n$2, {}):
    seq(a(n), n=0..60);  # Alois P. Heinz, May 17 2018
  • Mathematica
    Table[Select[IntegerPartitions[n],Or[SameQ@@#,CoprimeQ@@Union[#]]&]//Length,{n,20}]
    (* Second program: *)
    g[n_, i_, s_] := If[n == 0, 1, If[i < 1, 0, b[n, i, Select[s, # <= i &]]]];
    b[n_, i_, s_] := b[n, i, s] = g[n, i - 1, s] + Function[f,
         If[f ~Intersection~ s == {}, Sum[g[n - i*j, i - 1, s ~Union~ f],
         {j, 1, n/i}], 0]][FactorInteger[i][[All, 1]]];
    a[n_] := g[n, n, {}];
    a /@ Range[0, 60] (* Jean-François Alcover, May 10 2021, after Alois P. Heinz *)

A337452 Number of relatively prime strict integer partitions of n with no 1's.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 2, 1, 3, 2, 6, 3, 9, 7, 11, 11, 20, 15, 28, 24, 35, 36, 55, 47, 73, 71, 95, 96, 136, 123, 180, 177, 226, 235, 305, 299, 403, 406, 503, 523, 668, 662, 852, 873, 1052, 1115, 1370, 1391, 1720, 1784, 2125, 2252, 2701, 2786, 3348, 3520, 4116
Offset: 0

Views

Author

Gus Wiseman, Aug 31 2020

Keywords

Examples

			The a(5) = 1 through a(16) = 11 partitions (A = 10, B = 11, C = 12, D = 13):
  32  43  53  54   73   65   75   76   95    87    97
      52      72   532  74   543  85   B3    B4    B5
              432       83   732  94   653   D2    D3
                        92        A3   743   654   754
                        542       B2   752   753   763
                        632       643  932   762   853
                                  652  5432  843   943
                                  742        852   952
                                  832        942   B32
                                             A32   6532
                                             6432  7432
		

Crossrefs

A078374 is the version allowing 1's.
A302698 is the non-strict version.
A332004 is the ordered version allowing 1's.
A337450 is the ordered non-strict version.
A337451 is the ordered version.
A337485 is the pairwise coprime version.
A000837 counts relatively prime partitions.
A078374 counts relatively prime strict partitions.
A002865 counts partitions with no 1's.
A212804 counts compositions with no 1's.
A291166 appears to rank relatively prime compositions.
A337561 counts pairwise coprime strict compositions.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&!MemberQ[#,1]&&GCD@@#==1&]],{n,0,15}]

A366842 Number of integer partitions of n whose odd parts have a common divisor > 1.

Original entry on oeis.org

0, 0, 0, 1, 0, 2, 1, 4, 1, 8, 3, 13, 6, 21, 10, 36, 15, 53, 28, 80, 41, 122, 63, 174, 97, 250, 140, 359, 201, 496, 299, 685, 410, 949, 575, 1284, 804, 1726, 1093, 2327, 1482, 3076, 2023, 4060, 2684, 5358, 3572, 6970, 4745, 9050, 6221, 11734, 8115, 15060, 10609
Offset: 0

Views

Author

Gus Wiseman, Oct 28 2023

Keywords

Examples

			The a(3) = 1 through a(11) = 13 partitions:
  (3)  .  (5)    (3,3)  (7)      (3,3,2)  (9)        (5,5)      (11)
          (3,2)         (4,3)             (5,4)      (4,3,3)    (6,5)
                        (5,2)             (6,3)      (3,3,2,2)  (7,4)
                        (3,2,2)           (7,2)                 (8,3)
                                          (3,3,3)               (9,2)
                                          (4,3,2)               (4,4,3)
                                          (5,2,2)               (5,4,2)
                                          (3,2,2,2)             (6,3,2)
                                                                (7,2,2)
                                                                (3,3,3,2)
                                                                (4,3,2,2)
                                                                (5,2,2,2)
                                                                (3,2,2,2,2)
		

Crossrefs

This is the odd case of A018783, complement A000837.
The even version is A047967.
The complement is counted by A366850, ranks A366846.
A000041 counts integer partitions, strict A000009.
A000740 counts relatively prime compositions.
A113685 counts partitions by sum of odds, stat A366528, w/o zeros A365067.
A168532 counts partitions by gcd.
A239261 counts partitions with (sum of odd parts) = (sum of even parts).
A289508 gives gcd of prime indices, positions of ones A289509.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], GCD@@Select[#,OddQ]>1&]], {n,0,30}]
  • Python
    from math import gcd
    from sympy.utilities.iterables import partitions
    def A366842(n): return sum(1 for p in partitions(n) if gcd(*(q for q in p if q&1))>1) # Chai Wah Wu, Oct 28 2023

A366843 Number of integer partitions of n into odd, relatively prime parts.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 3, 4, 6, 6, 9, 11, 13, 17, 21, 23, 32, 37, 42, 53, 62, 70, 88, 103, 116, 139, 164, 184, 220, 255, 283, 339, 390, 435, 511, 578, 653, 759, 863, 963, 1107, 1259, 1401, 1609, 1814, 2015, 2303, 2589, 2878, 3259, 3648, 4058, 4580, 5119, 5672, 6364
Offset: 0

Views

Author

Gus Wiseman, Oct 28 2023

Keywords

Examples

			The a(1) = 1 through a(8) = 6 partitions:
  (1)  (11)  (111)  (31)    (311)    (51)      (331)      (53)
                    (1111)  (11111)  (3111)    (511)      (71)
                                     (111111)  (31111)    (3311)
                                               (1111111)  (5111)
                                                          (311111)
                                                          (11111111)
		

Crossrefs

Allowing even parts gives A000837.
The strict case is A366844, with evens A078374.
The complement is counted by A366852, with evens A018783.
The pairwise coprime version is A366853, with evens A051424.
A000041 counts integer partitions, strict A000009 (also into odds).
A000740 counts relatively prime compositions.
A168532 counts partitions by gcd.
A366842 counts partitions whose odd parts have a common divisor > 1.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],#=={}||And@@OddQ/@#&&GCD@@#==1&]],{n,0,30}]
  • Python
    from math import gcd
    from sympy.utilities.iterables import partitions
    def A366843(n): return sum(1 for p in partitions(n) if all(d&1 for d in p) and gcd(*p)==1) # Chai Wah Wu, Oct 30 2023

A328336 Numbers with no consecutive prime indices relatively prime.

Original entry on oeis.org

1, 2, 3, 5, 7, 9, 11, 13, 17, 19, 21, 23, 25, 27, 29, 31, 37, 39, 41, 43, 47, 49, 53, 57, 59, 61, 63, 65, 67, 71, 73, 79, 81, 83, 87, 89, 91, 97, 101, 103, 107, 109, 111, 113, 115, 117, 121, 125, 127, 129, 131, 133, 137, 139, 147, 149, 151, 157, 159, 163, 167
Offset: 1

Views

Author

Gus Wiseman, Oct 14 2019

Keywords

Comments

First differs from A318978 in having 897, with prime indices {2, 6, 9}.
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.
The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k), so these are Heinz numbers of partitions no consecutive parts relatively prime (A328187).
Besides the initial 1 this differs from A305078: 47541=897*prime(16) is in A305078 but not in this set. - Andrey Zabolotskiy, Nov 13 2019

Examples

			The sequence of terms together with their prime indices begins:
   1: {}
   2: {1}
   3: {2}
   5: {3}
   7: {4}
   9: {2,2}
  11: {5}
  13: {6}
  17: {7}
  19: {8}
  21: {2,4}
  23: {9}
  25: {3,3}
  27: {2,2,2}
  29: {10}
  31: {11}
  37: {12}
  39: {2,6}
  41: {13}
  43: {14}
		

Crossrefs

Numbers with consecutive prime indices relatively prime are A328335.
Strict partitions with no consecutive parts relatively prime are A328220.
Numbers with relatively prime prime indices are A289509.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],!MatchQ[primeMS[#],{_,x_,y_,_}/;GCD[x,y]==1]&]

A337451 Number of relatively prime strict compositions of n with no 1's.

Original entry on oeis.org

0, 0, 0, 0, 0, 2, 0, 4, 2, 10, 8, 20, 14, 34, 52, 72, 90, 146, 172, 244, 390, 502, 680, 956, 1218, 1686, 2104, 3436, 4078, 5786, 7200, 10108, 12626, 17346, 20876, 32836, 38686, 53674, 67144, 91528, 113426, 152810, 189124, 245884, 343350, 428494, 552548, 719156
Offset: 0

Views

Author

Gus Wiseman, Aug 31 2020

Keywords

Comments

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

Examples

			The a(5) = 2 through a(10) = 8 compositions (empty column indicated by dot):
  (2,3)  .  (2,5)  (3,5)  (2,7)    (3,7)
  (3,2)     (3,4)  (5,3)  (4,5)    (7,3)
            (4,3)         (5,4)    (2,3,5)
            (5,2)         (7,2)    (2,5,3)
                          (2,3,4)  (3,2,5)
                          (2,4,3)  (3,5,2)
                          (3,2,4)  (5,2,3)
                          (3,4,2)  (5,3,2)
                          (4,2,3)
                          (4,3,2)
		

Crossrefs

A032022 does not require relative primality.
A302698 is the unordered non-strict version.
A332004 is the version allowing 1's.
A337450 is the non-strict version.
A337452 is the unordered version.
A000837 counts relatively prime partitions.
A032020 counts strict compositions.
A078374 counts strict relatively prime partitions.
A002865 counts partitions with no 1's.
A212804 counts compositions with no 1's.
A291166 appears to rank relatively prime compositions.
A337462 counts pairwise coprime compositions.
A337561 counts strict pairwise coprime compositions.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],UnsameQ@@#&&!MemberQ[#,1]&&GCD@@#==1&]],{n,0,15}]

A303139 Number of integer partitions of n with at least two but not all parts having a common divisor greater than 1.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 5, 6, 13, 17, 33, 37, 68, 82, 125, 159, 237, 278, 409, 491, 674, 830, 1121, 1329, 1781, 2144, 2770, 3345, 4299, 5086, 6507, 7752, 9687, 11571, 14378, 16985, 21039, 24876, 30379, 35924, 43734, 51320, 62238, 73068, 87747, 103021, 123347, 143955
Offset: 1

Views

Author

Gus Wiseman, Apr 19 2018

Keywords

Examples

			The a(7) = 5 partitions are (421), (331), (322), (2221), (22111).
		

Crossrefs

Programs

  • Mathematica
    Table[Select[IntegerPartitions[n],!CoprimeQ@@#&&GCD@@#===1&]//Length,{n,30}]

A303280 Number of strict integer partitions of n whose parts have a common divisor other than 1.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 2, 2, 3, 1, 5, 1, 5, 4, 6, 1, 10, 1, 11, 6, 12, 1, 19, 3, 18, 8, 23, 1, 36, 1, 32, 13, 38, 7, 57, 1, 54, 19, 68, 1, 95, 1, 90, 33, 104, 1, 148, 5, 149, 39, 166, 1, 230, 14, 226, 55, 256, 1, 360, 1, 340, 82, 390, 20, 527, 1, 513, 105, 609, 1
Offset: 1

Views

Author

Gus Wiseman, Apr 20 2018

Keywords

Examples

			The a(18) = 10 strict partitions are (18), (10,8), (12,6), (14,4), (15,3), (16,2), (8,6,4), (9,6,3), (10,6,2), (12,4,2).
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    b:= proc(n) option remember; `if`(n=0, 1, add(add(
          `if`(d::odd, d, 0), d=divisors(j))*b(n-j), j=1..n)/n)
        end:
    a:= n-> -add(mobius(d)*b(n/d), d=divisors(n) minus {1}):
    seq(a(n), n=1..100);  # Alois P. Heinz, Apr 23 2018
  • Mathematica
    Table[-Sum[MoebiusMu[d]*PartitionsQ[n/d],{d,Rest[Divisors[n]]}],{n,100}]

Formula

a(n) = -Sum_{d|n, d > 1} mu(d) * A000009(n/d).
Previous Showing 21-30 of 75 results. Next