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

A328028 Nonprime numbers n whose proper divisors (greater than 1 and less than n) have no consecutive divisibilities.

Original entry on oeis.org

1, 4, 6, 9, 10, 12, 14, 15, 21, 22, 24, 25, 26, 30, 33, 34, 35, 36, 38, 39, 45, 46, 48, 49, 51, 55, 57, 58, 60, 62, 63, 65, 69, 70, 72, 74, 77, 82, 84, 85, 86, 87, 90, 91, 93, 94, 95, 96, 105, 106, 108, 111, 115, 118, 119, 120, 121, 122, 123, 129, 132, 133, 134
Offset: 1

Views

Author

Gus Wiseman, Oct 06 2019

Keywords

Examples

			The proper divisors of 18 are {2, 3, 6, 9}, and {3, 6} are a consecutive divisible pair, so 18 does not belong to the sequence.
The proper divisors of 60 are {2, 3, 4, 5, 6, 10, 12, 15, 20, 30}, and none of {2, 3}, {3, 4}, {4, 5}, {5, 6}, {6, 10}, {10, 12}, {12, 15}, {15, 20}, or {20, 30} are divisible pairs, so 60 belongs to the sequence.
		

Crossrefs

Positions of 0's or 2's in A328026.
1 and positions of 1's in A328194.
The version including primes is A328161.
Partitions with no consecutive divisibilities are A328171.
Numbers whose proper divisors have no consecutive successions are A088725.
Contains A001358.

Programs

  • Maple
    filter:= proc(n) local D,i;
      if isprime(n) then return false fi;
      D:= sort(convert(numtheory:-divisors(n) minus {1,n}, list));
      for i from 1 to nops(D)-1 do if (D[i+1]/D[i])::integer then return false fi od:
      true
    end proc:
    select(filter, [$1..300]); # Robert Israel, Oct 11 2019
  • Mathematica
    Select[Range[100],!PrimeQ[#]&&!MatchQ[DeleteCases[Divisors[#],1|#],{_,x_,y_,_}/;Divisible[y,x]]&]

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

A328598 Number of compositions of n with no part circularly followed by a divisor.

Original entry on oeis.org

1, 0, 0, 0, 0, 2, 0, 4, 2, 7, 12, 11, 22, 26, 55, 63, 99, 149, 215, 324, 458, 699, 1006, 1492, 2185, 3202, 4734, 6928, 10242, 14951, 22023, 32365, 47557, 69905, 102633, 150983, 221712, 325918, 478841, 703647, 1034103, 1519431, 2233061, 3281003, 4821790, 7085358
Offset: 0

Views

Author

Gus Wiseman, Oct 24 2019

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n.
Circularity means the last part is followed by the first.

Examples

			The a(5) = 2 through a(12) = 22 compositions (empty column not shown):
  (2,3)  (2,5)  (3,5)  (2,7)    (3,7)      (2,9)    (5,7)
  (3,2)  (3,4)  (5,3)  (4,5)    (4,6)      (3,8)    (7,5)
         (4,3)         (5,4)    (6,4)      (4,7)    (2,3,7)
         (5,2)         (7,2)    (7,3)      (5,6)    (2,7,3)
                       (2,4,3)  (2,3,5)    (6,5)    (3,2,7)
                       (3,2,4)  (2,5,3)    (7,4)    (3,4,5)
                       (4,3,2)  (3,2,5)    (8,3)    (3,5,4)
                                (3,5,2)    (9,2)    (3,7,2)
                                (5,2,3)    (2,4,5)  (4,3,5)
                                (5,3,2)    (4,5,2)  (4,5,3)
                                (2,3,2,3)  (5,2,4)  (5,3,4)
                                (3,2,3,2)           (5,4,3)
                                                    (7,2,3)
                                                    (7,3,2)
                                                    (2,3,2,5)
                                                    (2,3,4,3)
                                                    (2,5,2,3)
                                                    (3,2,3,4)
                                                    (3,2,5,2)
                                                    (3,4,3,2)
                                                    (4,3,2,3)
                                                    (5,2,3,2)
		

Crossrefs

The necklace version is A328600, or A318729 without singletons.
The version with singletons is A318726.
The non-circular version is A328460.
Also forbidding parts circularly followed by a multiple gives A328599.
Partitions with no part followed by a divisor are A328171.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],And@@Not/@Divisible@@@Partition[#,2,1,1]&]],{n,0,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)->i%j<>0)))} \\ Andrew Howroyd, Oct 26 2019

Formula

a(n > 0) = A318726(n) - 1.

Extensions

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

A328161 Numbers n that are prime or whose proper divisors (greater than 1 and less than n) have no consecutive divisibilities.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 19, 21, 22, 23, 24, 25, 26, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 43, 45, 46, 47, 48, 49, 51, 53, 55, 57, 58, 59, 60, 61, 62, 63, 65, 67, 69, 70, 71, 72, 73, 74, 77, 79, 82, 83, 84, 85, 86, 87, 89, 90, 91
Offset: 1

Views

Author

Gus Wiseman, Oct 06 2019

Keywords

Examples

			The proper divisors of 18 are {2, 3, 6, 9}, and {3, 6} are a consecutive divisible pair, so 18 does not belong to the sequence.
The proper divisors of 60 are {2, 3, 4, 5, 6, 10, 12, 15, 20, 30}, and none of {2, 3}, {3, 4}, {4, 5}, {5, 6}, {6, 10}, {10, 12}, {12, 15}, {15, 20}, or {20, 30} are divisible pairs, so 60 belongs to the sequence.
		

Crossrefs

Equals the union of A328028 and A000040.
Complement of A328189.
One, primes, and positions of 1's in A328194.
Partitions with no consecutive divisibilities are A328171.

Programs

  • Maple
    filter:= proc(n) local D,i;
      if isprime(n) then return true fi;
      D:= sort(convert(numtheory:-divisors(n) minus {1,n}, list));
      for i from 1 to nops(D)-1 do if (D[i+1]/D[i])::integer then return false fi od:
      true
    end proc:
    select(filter, [$1..100]); # Robert Israel, Oct 11 2019
  • Mathematica
    Select[Range[100],!MatchQ[DeleteCases[Divisors[#],1|#],{_,x_,y_,_}/;Divisible[y,x]]&]

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

A328189 Numbers n with at least one pair of consecutive divisible nontrivial divisors (greater than 1 and less than n).

Original entry on oeis.org

8, 16, 18, 20, 27, 28, 32, 40, 42, 44, 50, 52, 54, 56, 64, 66, 68, 75, 76, 78, 80, 81, 88, 92, 98, 99, 100, 102, 104, 110, 112, 114, 116, 117, 124, 125, 126, 128, 130, 136, 138, 140, 147, 148, 152, 153, 156, 160, 162, 164, 170, 171, 172, 174, 176, 184, 186
Offset: 1

Views

Author

Gus Wiseman, Oct 13 2019

Keywords

Examples

			The nontrivial divisors of 42 are {2, 3, 6, 7, 14, 21}, with pairs of consecutive divisible divisors {3, 6} and {7, 14}, so 42 belongs to the sequence.
		

Crossrefs

Complement of A328161.
Positions of terms greater than 1 in A328194.
Partitions with a pair of consecutive divisible parts are A328221.

Programs

  • Mathematica
    Select[Range[200],MatchQ[DeleteCases[Divisors[#],1|#],{_,x_,y_,_}/;Divisible[y,x]]&]
    Select[Range[2,200],AnyTrue[Partition[Most[Rest[Divisors[#]]],2,1],Mod[#[[2]],#[[1]]] == 0&]&] (* Harvey P. Dale, Mar 14 2023 *)

A328194 Maximum length of a divisibility chain of consecutive nontrivial divisors of n (greater than 1 and less than n).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Oct 14 2019

Keywords

Comments

The nontrivial divisors of n are row n of A163870.

Examples

			The nontrivial divisors of 272 are {2, 4, 8, 16, 17, 34, 68, 136} with divisibility chains {{2, 4, 8, 16}, {17, 34, 68, 136}}, so a(272) = 4.
		

Crossrefs

Positions of 1's are A328028 without 1.
The version with all divisors allowed is A328162.
Allowing n as a divisor of n gives A328195.
Indices of terms greater than 1 are A328189.
The maximum run-length of divisors of n is A055874(n).

Programs

  • Mathematica
    Table[Switch[n,1,0,?PrimeQ,0,,Max@@Length/@Split[DeleteCases[Divisors[n],1|n],Divisible[#2,#1]&]],{n,100}]
  • PARI
    A328194(n) = if(1==n || isprime(n), 0, my(divs=divisors(n), rl=0,ml=1); for(i=2,#divs-1,if(!(divs[i]%divs[i-1]), rl++, ml = max(rl,ml); rl=1)); max(ml,rl)); \\ Antti Karttunen, Dec 07 2024

Extensions

Data section extended up to a(105) by Antti Karttunen, Dec 07 2024

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

A328593 Numbers whose binary indices have no consecutive divisible parts.

Original entry on oeis.org

0, 1, 2, 4, 6, 8, 12, 14, 16, 18, 20, 22, 24, 28, 30, 32, 40, 44, 46, 48, 50, 52, 54, 56, 60, 62, 64, 66, 68, 70, 72, 76, 78, 80, 82, 84, 86, 88, 92, 94, 96, 104, 108, 110, 112, 114, 116, 118, 120, 124, 126, 128, 132, 134, 144, 146, 148, 150, 152, 156, 158, 160
Offset: 1

Views

Author

Gus Wiseman, Oct 21 2019

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.

Examples

			The sequence of terms together with their binary expansions and binary indices begins:
   0:      0 ~ {}
   1:      1 ~ {1}
   2:     10 ~ {2}
   4:    100 ~ {3}
   6:    110 ~ {2,3}
   8:   1000 ~ {4}
  12:   1100 ~ {3,4}
  14:   1110 ~ {2,3,4}
  16:  10000 ~ {5}
  18:  10010 ~ {2,5}
  20:  10100 ~ {3,5}
  22:  10110 ~ {2,3,5}
  24:  11000 ~ {4,5}
  28:  11100 ~ {3,4,5}
  30:  11110 ~ {2,3,4,5}
  32: 100000 ~ {6}
  40: 101000 ~ {4,6}
  44: 101100 ~ {3,4,6}
  46: 101110 ~ {2,3,4,6}
  48: 110000 ~ {5,6}
  50: 110010 ~ {2,5,6}
		

Crossrefs

The version for prime indices is A328603.
Numbers with no successive binary indices are A003714.
Partitions with no consecutive divisible parts are A328171.
Compositions without consecutive divisible parts are A328460.

Programs

  • Mathematica
    Select[Range[0,100],!MatchQ[Join@@Position[Reverse[IntegerDigits[#,2]],1],{_,x_,y_,_}/;Divisible[y,x]]&]
Previous Showing 11-20 of 32 results. Next