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

A328460 Number of compositions of n with no part divisible by the next.

Original entry on oeis.org

1, 1, 1, 2, 2, 4, 5, 8, 11, 16, 26, 35, 53, 76, 115, 168, 244, 363, 528, 782, 1144, 1685, 2474, 3633, 5347, 7844, 11539, 16946, 24919, 36605, 53782, 79053, 116142, 170700, 250800, 368585, 541610, 795884, 1169572, 1718593, 2525522, 3711134, 5453542, 8013798, 11776138
Offset: 0

Views

Author

Gus Wiseman, Oct 17 2019

Keywords

Examples

			The a(1) = 1 through a(9) = 16 compositions:
  (1)  (2)  (3)   (4)   (5)   (6)    (7)    (8)     (9)
            (21)  (31)  (23)  (42)   (25)   (35)    (27)
                        (32)  (51)   (34)   (53)    (45)
                        (41)  (231)  (43)   (62)    (54)
                              (321)  (52)   (71)    (63)
                                     (61)   (251)   (72)
                                     (232)  (323)   (81)
                                     (421)  (341)   (234)
                                            (431)   (252)
                                            (521)   (342)
                                            (2321)  (351)
                                                    (423)
                                                    (432)
                                                    (531)
                                                    (621)
                                                    (3231)
		

Crossrefs

The case of partitions is A328171.
If we also require no part to be divisible by the prior, we get A328508.
Compositions with each part relatively prime to the next are A167606.
Compositions with no part relatively prime to the next are A178470.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!MatchQ[#,{_,x_,y_,_}/;Divisible[y,x]]&]],{n,0,10}]
  • PARI
    seq(n)={my(r=matid(n)); for(k=1, n, for(i=1, k-1, r[i,k]=sum(j=1, k-i, if(j%i, r[j, k-i])))); concat([1], vecsum(Col(r)))} \\ Andrew Howroyd, Oct 19 2019

Extensions

Terms a(26) and beyond from Andrew Howroyd, Oct 19 2019

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}]

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]&]

A328188 Number of strict integer partitions of n with all pairs of consecutive parts relatively prime.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 3, 4, 5, 6, 7, 8, 9, 12, 15, 15, 19, 23, 25, 30, 35, 39, 47, 52, 58, 65, 75, 86, 95, 109, 124, 144, 165, 181, 203, 221, 249, 285, 316, 352, 392, 438, 484, 538, 599, 666, 737, 813, 899, 992, 1102, 1215, 1335, 1472, 1621, 1776, 1946, 2137, 2336
Offset: 0

Views

Author

Gus Wiseman, Oct 13 2019

Keywords

Examples

			The a(1) = 1 through a(15) = 15 partitions (A..F = 10..15):
  1  2  3   4   5   6    7   8    9    A     B     C    D     E     F
        21  31  32  51   43  53   54   73    65    75   76    95    87
                41  321  52  71   72   91    74    B1   85    B3    B4
                         61  431  81   532   83    543  94    D1    D2
                             521  432  541   92    651  A3    653   E1
                                  531  721   A1    732  B2    743   654
                                       4321  731   741  C1    752   753
                                             5321  831  652   761   852
                                                   921  751   851   951
                                                        832   941   A32
                                                        5431  A31   B31
                                                        7321  B21   6531
                                                              5432  7431
                                                              6521  7521
                                                              8321  54321
		

Crossrefs

The case of compositions is A167606.
The non-strict case is A328172.
The Heinz numbers of these partitions are given by A328335.
Partitions with no pairs of consecutive parts relatively prime are A328187.

Programs

  • Maple
    b:= proc(n, i, s) option remember; `if`(i*(i+1)/2 igcd(i, j)=1, s), b(n-i, min(n-i, i-1),
               numtheory[factorset](i)), 0)+b(n, i-1, s)))
        end:
    a:= n-> b(n$2, {}):
    seq(a(n), n=0..60);  # Alois P. Heinz, Oct 13 2019
  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&!MatchQ[#,{_,x_,y_,_}/;GCD[x,y]>1]&]],{n,0,30}]
    (* Second program: *)
    b[n_, i_, s_] := b[n, i, s] = If[i(i + 1)/2 < n, 0, If[n == 0, 1, If[AllTrue[s,  GCD[i, #] == 1&], b[n - i, Min[n - i, i - 1], FactorInteger[i][[All, 1]]], 0] + b[n, i - 1, s]]];
    a[n_] := b[n, n, {}];
    a /@ Range[0, 60] (* Jean-François Alcover, May 10 2021, after Alois P. Heinz *)

A328508 Number of compositions of n with no part divisible by the next or the prior.

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 1, 6, 4, 8, 14, 14, 27, 30, 55, 69, 97, 155, 200, 312, 421, 630, 893, 1260, 1864, 2600, 3813, 5395, 7801, 11196, 15971, 23126, 32917, 47514, 67993, 97670, 140334, 200913, 289147, 414119, 595109, 853751, 1225086, 1759405, 2523151, 3623984, 5198759
Offset: 0

Views

Author

Gus Wiseman, Oct 17 2019

Keywords

Examples

			The a(1) = 1 through a(11) = 14 compositions (A = 10, B = 11):
  (1)  (2)  (3)  (4)  (5)   (6)  (7)    (8)    (9)    (A)     (B)
                      (23)       (25)   (35)   (27)   (37)    (29)
                      (32)       (34)   (53)   (45)   (46)    (38)
                                 (43)   (323)  (54)   (64)    (47)
                                 (52)          (72)   (73)    (56)
                                 (232)         (234)  (235)   (65)
                                               (252)  (253)   (74)
                                               (432)  (325)   (83)
                                                      (343)   (92)
                                                      (352)   (254)
                                                      (523)   (272)
                                                      (532)   (353)
                                                      (2323)  (434)
                                                      (3232)  (452)
		

Crossrefs

The case of partitions is A328171.
If we only forbid parts to be divisible by the next, we get A328460.
Compositions with each part relatively prime to the next are A167606.
Compositions with no part relatively prime to the next are A178470.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!MatchQ[#,{_,x_,y_,_}/;Divisible[y,x]||Divisible[x,y]]&]],{n,0,10}]
  • PARI
    seq(n)={my(r=matid(n)); for(k=1, n, for(i=1, k-1, r[i,k]=sum(j=1, k-i, if(i%j && j%i, r[j, k-i])))); concat([1], vecsum(Col(r)))} \\ Andrew Howroyd, Oct 19 2019

Extensions

Terms a(26) and beyond from Andrew Howroyd, Oct 19 2019

A328609 Number of compositions of n whose circularly adjacent parts are relatively prime.

Original entry on oeis.org

1, 1, 1, 3, 6, 12, 23, 42, 81, 150, 284, 534, 1004, 1882, 3532, 6630, 12459, 23406, 43951, 82537, 154998, 291087, 546673, 1026686, 1928117, 3621016, 6800299, 12771085, 23984328, 45042958, 84591338, 158863806, 298348612, 560303341, 1052258401, 1976157509
Offset: 0

Views

Author

Gus Wiseman, Oct 26 2019

Keywords

Comments

Circularity means the last part is followed by the first.

Examples

			The a(1) = 1 through a(6) = 23 compositions:
  (1)  (11)  (12)   (13)    (14)     (15)
             (21)   (31)    (23)     (51)
             (111)  (112)   (32)     (114)
                    (121)   (41)     (123)
                    (211)   (113)    (132)
                    (1111)  (131)    (141)
                            (311)    (213)
                            (1112)   (231)
                            (1121)   (312)
                            (1211)   (321)
                            (2111)   (411)
                            (11111)  (1113)
                                     (1131)
                                     (1212)
                                     (1311)
                                     (2121)
                                     (3111)
                                     (11112)
                                     (11121)
                                     (11211)
                                     (12111)
                                     (21111)
                                     (111111)
		

Crossrefs

The necklace version is A328597 or A318728 (with singletons).
The aperiodic version is A328670.
The Lyndon word version is A318745.
The version with singletons is A318748.
The non-circular version is A167606.
Relatively prime compositions are A000740.
Compositions with no part circularly followed by a divisor are A328598.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],And@@CoprimeQ@@@Partition[#,2,1,1]&]],{n,10}]
  • PARI
    b(n, q, pred)={my(M=matrix(n, n)); for(k=1, n, M[k, k]=pred(q, k); for(i=1, k-1, M[i, k]=sum(j=1, k-i, if(pred(j, i), M[j, k-i], 0)))); M[q, ]}
    seq(n)={concat([1], sum(k=1, n, b(n, k, (i, j)->gcd(i, j)==1)))} \\ Andrew Howroyd, Nov 01 2019

Formula

a(n > 1) = A318748(n) - 1.

A328221 Number of integer partitions of n with at least one pair of consecutive divisible parts.

Original entry on oeis.org

0, 0, 1, 2, 4, 5, 10, 12, 20, 26, 38, 51, 73, 92, 126, 166, 219, 283, 369, 470, 604, 763, 968, 1217, 1534, 1907, 2376, 2944, 3640, 4476, 5501, 6723, 8212, 9986, 12130, 14682, 17748, 21376, 25717, 30847, 36959, 44152, 52688, 62714, 74557, 88440, 104775, 123878
Offset: 0

Views

Author

Gus Wiseman, Oct 15 2019

Keywords

Comments

Includes all non-strict partitions.

Examples

			The a(2) = 1 through a(8) = 20 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)  (321)     (511)      (422)
                                (411)     (2221)     (431)
                                (2211)    (3211)     (521)
                                (3111)    (4111)     (611)
                                (21111)   (22111)    (2222)
                                (111111)  (31111)    (3221)
                                          (211111)   (3311)
                                          (1111111)  (4211)
                                                     (5111)
                                                     (22211)
                                                     (32111)
                                                     (41111)
                                                     (221111)
                                                     (311111)
                                                     (2111111)
                                                     (11111111)
		

Crossrefs

The complement is counted by A328171.
Partitions whose consecutive parts are relatively prime are A328172.
Partitions with no pair of consecutive parts relatively prime are A328187.
Numbers without consecutive divisible proper divisors are A328028.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],MatchQ[#,{_,x_,y_,_}/;Divisible[x,y]]&]],{n,0,30}]

A328597 Number of necklace compositions of n where every pair of adjacent parts (including the last with the first) is relatively prime.

Original entry on oeis.org

1, 1, 2, 3, 5, 8, 12, 21, 33, 57, 94, 167, 279, 491, 852, 1507, 2647, 4714, 8349, 14923, 26642, 47793, 85778, 154474, 278322, 502715, 908912, 1646205, 2984546, 5418652, 9847189, 17916000, 32625617, 59470539, 108493149, 198094482, 361965238, 661891579, 1211162270
Offset: 1

Views

Author

Gus Wiseman, Oct 23 2019

Keywords

Comments

A necklace composition of n is a finite sequence of positive integers summing to n that is lexicographically minimal among all of its cyclic rotations.

Examples

			The a(1) = 1 through a(7) = 12 necklace compositions:
  (1)  (1,1)  (1,2)    (1,3)      (1,4)        (1,5)          (1,6)
              (1,1,1)  (1,1,2)    (2,3)        (1,1,4)        (2,5)
                       (1,1,1,1)  (1,1,3)      (1,2,3)        (3,4)
                                  (1,1,1,2)    (1,3,2)        (1,1,5)
                                  (1,1,1,1,1)  (1,1,1,3)      (1,1,1,4)
                                               (1,2,1,2)      (1,1,2,3)
                                               (1,1,1,1,2)    (1,1,3,2)
                                               (1,1,1,1,1,1)  (1,2,1,3)
                                                              (1,1,1,1,3)
                                                              (1,1,2,1,2)
                                                              (1,1,1,1,1,2)
                                                              (1,1,1,1,1,1,1)
		

Crossrefs

The non-necklace version is A328609.
The non-necklace non-circular version is A167606.
The version with singletons is A318728.
The aperiodic case is A318745.
The indivisible (instead of coprime) version is A328600.
The non-coprime (instead of coprime) version is A328602.
Necklace compositions are A008965.

Programs

  • Mathematica
    neckQ[q_]:=Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],neckQ[#]&&And@@CoprimeQ@@@Partition[#,2,1,1]&]],{n,10}]
  • PARI
    b(n, q, pred)={my(M=matrix(n, n)); for(k=1, n, M[k, k]=pred(q, k); for(i=1, k-1, M[i, k]=sum(j=1, k-i, if(pred(j, i), M[j, k-i], 0)))); M[q,]}
    seq(n)={my(v=sum(k=1, n, k*b(n, k, (i,j)->gcd(i,j)==1))); vector(n, n, sumdiv(n, d, eulerphi(d)*v[n/d])/n)} \\ Andrew Howroyd, Oct 26 2019

Formula

a(n > 1) = A318728(n) - 1.

Extensions

Terms a(21) and beyond from Andrew Howroyd, Oct 26 2019

A328602 Number of necklace compositions of n where no pair of circularly adjacent parts is relatively prime.

Original entry on oeis.org

0, 1, 1, 2, 1, 4, 1, 5, 3, 8, 1, 16, 1, 20, 9, 35, 2, 69, 3, 111, 24, 190, 13, 384, 31, 646, 102, 1212, 113, 2348, 227, 4254, 613, 7993, 976, 15459, 1915, 28825, 4357, 54988, 7868, 105826, 15760, 201115, 33376, 385590, 63974, 744446, 128224, 1428047, 262914, 2754037
Offset: 1

Views

Author

Gus Wiseman, Oct 25 2019

Keywords

Comments

A necklace composition of n (A008965) is a finite sequence of positive integers summing to n that is lexicographically minimal among all of its cyclic rotations.
Circularity means the last part is followed by the first.

Examples

			The a(2) = 1 through a(10) = 8 necklace compositions:
  (2)  (3)  (4)    (5)  (6)      (7)  (8)        (9)      (10)
            (2,2)       (2,4)         (2,6)      (3,6)    (2,8)
                        (3,3)         (4,4)      (3,3,3)  (4,6)
                        (2,2,2)       (2,2,4)             (5,5)
                                      (2,2,2,2)           (2,2,6)
                                                          (2,4,4)
                                                          (2,2,2,4)
                                                          (2,2,2,2,2)
The a(19) = 3 necklace compositions are: (19), (3,6,4,6), (2,2,6,3,6).
		

Crossrefs

The non-necklace, non-circular version is A178470.
The version for indivisibility (rather than co-primality) is A328600.
The circularly coprime (as opposed to anti-coprime) version is A328597.
Partitions with no consecutive parts relatively prime are A328187.

Programs

  • Mathematica
    neckQ[q_]:=Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],neckQ[#]&&And@@Not/@CoprimeQ@@@Partition[#,2,1,1]&]],{n,10}]
  • PARI
    b(n, q, pred)={my(M=matrix(n, n)); for(k=1, n, M[k, k]=pred(q, k); for(i=1, k-1, M[i, k]=sum(j=1, k-i, if(pred(j, i), M[j, k-i], 0)))); M[q,]}
    seq(n)={my(v=sum(k=1, n, k*b(n, k, (i,j)->gcd(i,j)<>1))); vector(n, n, sumdiv(n, d, eulerphi(d)*v[n/d])/n)} \\ Andrew Howroyd, Oct 26 2019

Extensions

Terms a(26) and beyond from Andrew Howroyd, Oct 26 2019

A328669 Number of Lyndon compositions of n where every pair of adjacent parts (including the last with the first) is relatively prime.

Original entry on oeis.org

1, 0, 1, 2, 4, 6, 11, 18, 31, 52, 93, 157, 278, 479, 846, 1486, 2646, 4675, 8348, 14864, 26629, 47699, 85777, 154289, 278317, 502436, 908879, 1645712, 2984545, 5417742, 9847188, 17914493, 32625522, 59467892, 108493133, 198089609, 361965237, 661883230, 1211161990
Offset: 1

Views

Author

Gus Wiseman, Oct 26 2019

Keywords

Comments

A Lyndon composition of n is a finite sequence of positive integers summing to n that is lexicographically strictly less than all of its cyclic rotations.

Examples

			The a(1) = 1 through a(8) = 18 Lyndon compositions (empty column not shown):
  (1)  (12)  (13)   (14)    (15)     (16)      (17)
             (112)  (23)    (114)    (25)      (35)
                    (113)   (123)    (34)      (116)
                    (1112)  (132)    (115)     (125)
                            (1113)   (1114)    (134)
                            (11112)  (1123)    (143)
                                     (1132)    (152)
                                     (1213)    (1115)
                                     (11113)   (1214)
                                     (11212)   (1232)
                                     (111112)  (11114)
                                               (11123)
                                               (11132)
                                               (11213)
                                               (11312)
                                               (111113)
                                               (111212)
                                               (1111112)
		

Crossrefs

The non-Lyndon version is A328609 or A318748 (with singletons).
The non-Lyndon non-circular version is A167606.
The version with singletons is A318745.
The necklace case is A328597 or A318728 (with singletons).
The aperiodic case is A328670.
Lyndon compositions are A059966, with relatively prime case A318731.

Programs

  • Mathematica
    aperQ[q_]:=Array[RotateRight[q,#]&,Length[q],1,UnsameQ];
    neckQ[q_]:=Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],aperQ[#]&&neckQ[#]&&And@@CoprimeQ@@@Partition[#,2,1,1]&]],{n,10}]
  • PARI
    b(n, q, pred)={my(M=matrix(n, n)); for(k=1, n, M[k, k]=pred(q, k); for(i=1, k-1, M[i, k]=sum(j=1, k-i, if(pred(j, i), M[j, k-i], 0)))); M[q, ]}
    seq(n)={my(v=sum(k=1, n, k*b(n, k, (i, j)->gcd(i, j)==1))); vector(n, n, sumdiv(n, d, moebius(d)*v[n/d])/n)} \\ Andrew Howroyd, Nov 01 2019

Formula

a(n > 1) = A318745(n) - 1.
Previous Showing 11-20 of 22 results. Next