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-5 of 5 results.

A335455 Number of compositions of n with some part appearing more than twice.

Original entry on oeis.org

0, 0, 0, 1, 1, 5, 11, 30, 69, 142, 334, 740, 1526, 3273, 6840, 14251, 29029, 59729, 122009, 248070, 500649, 1012570, 2040238, 4107008, 8257466, 16562283, 33229788, 66621205, 133478437, 267326999, 535146239, 1071183438, 2143604313, 4289194948, 8581463248
Offset: 0

Views

Author

Gus Wiseman, Jun 15 2020

Keywords

Comments

Also the number of compositions of n matching the pattern (1,1,1).
A composition of n is a finite sequence of positive integers summing to n.

Examples

			The a(3) = 1 through a(6) = 11 compositions:
  (111)  (1111)  (1112)   (222)
                 (1121)   (1113)
                 (1211)   (1131)
                 (2111)   (1311)
                 (11111)  (3111)
                          (11112)
                          (11121)
                          (11211)
                          (12111)
                          (21111)
                          (111111)
		

Crossrefs

The case of partitions is A000726.
The avoiding version is A232432.
The (1,1)-matching version is A261982.
The version for patterns is A335508.
The version for prime indices is A335510.
These compositions are ranked by A335512.
Compositions are counted by A011782.
Combinatory separations are counted by A269134.
Normal patterns matched by compositions are counted by A335456.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Max@@Length/@Split[Sort[#]]>=3&]],{n,0,10}]

Formula

a(n > 0) = 2^(n - 1) - A232432(n).

A335488 Numbers k such that the k-th composition in standard order (A066099) matches the pattern (1,1).

Original entry on oeis.org

3, 7, 10, 11, 13, 14, 15, 19, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 35, 36, 39, 42, 43, 45, 46, 47, 49, 51, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 67, 71, 73, 74, 75, 76, 77, 78, 79, 82, 83, 84, 85, 86, 87, 89, 90, 91, 92, 93, 94, 95, 97, 99, 100, 101
Offset: 1

Views

Author

Gus Wiseman, Jun 18 2020

Keywords

Comments

These are compositions with some part appearing more than once, or non-strict compositions.
A composition of n is a finite sequence of positive integers summing to n. 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.
We define a pattern to be a finite sequence covering an initial interval of positive integers. Patterns are counted by A000670 and ranked by A333217. A sequence S is said to match a pattern P if there is a not necessarily contiguous subsequence of S whose parts have the same relative order as P. For example, (3,1,1,3) matches (1,1,2), (2,1,1), and (2,1,2), but avoids (1,2,1), (1,2,2), and (2,2,1).

Examples

			The sequence of terms together with the corresponding compositions begins:
   3: (1,1)
   7: (1,1,1)
  10: (2,2)
  11: (2,1,1)
  13: (1,2,1)
  14: (1,1,2)
  15: (1,1,1,1)
  19: (3,1,1)
  21: (2,2,1)
  22: (2,1,2)
  23: (2,1,1,1)
  25: (1,3,1)
  26: (1,2,2)
  27: (1,2,1,1)
  28: (1,1,3)
		

Crossrefs

The complement A233564 is the avoiding version.
Patterns matching this pattern are counted by A019472 (by length).
Permutations of prime indices matching this pattern are counted by A335487.
These compositions are counted by A261982 (by sum).
Constant patterns are counted by A000005 and ranked by A272919.
Permutations are counted by A000142 and ranked by A333218.
Patterns are counted by A000670 and ranked by A333217.
Non-unimodal compositions are counted by A115981 and ranked by A335373.
Combinatory separations are counted by A269134.
Patterns matched by standard compositions are counted by A335454.
Minimal patterns avoided by a standard composition are counted by A335465.
The (1,1,1)-matching case is A335512.

Programs

  • Mathematica
    stc[n_]:=Reverse[Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]];
    Select[Range[0,100],MatchQ[stc[#],{_,x_,_,x_,_}]&]

A335508 Number of patterns of length n matching the pattern (1,1,1).

Original entry on oeis.org

0, 0, 0, 1, 9, 91, 993, 12013, 160275, 2347141, 37496163, 649660573, 12142311195, 243626199181, 5224710549243, 119294328993853, 2889836999693355, 74037381200415901, 2000383612949821323, 56850708386783835133, 1695491518035158123115, 52949018580275965241821
Offset: 0

Views

Author

Gus Wiseman, Jun 18 2020

Keywords

Comments

We define a pattern to be a finite sequence covering an initial interval of positive integers. Patterns are counted by A000670 and ranked by A333217. A sequence S is said to match a pattern P if there is a not necessarily contiguous subsequence of S whose parts have the same relative order as P. For example, (3,1,1,3) matches (1,1,2), (2,1,1), and (2,1,2), but avoids (1,2,1), (1,2,2), and (2,2,1).

Examples

			The a(3) = 1 through a(4) = 9 patterns:
  (1,1,1)  (1,1,1,1)
           (1,1,1,2)
           (1,1,2,1)
           (1,2,1,1)
           (1,2,2,2)
           (2,1,1,1)
           (2,1,2,2)
           (2,2,1,2)
           (2,2,2,1)
		

Crossrefs

The complement A080599 is the avoiding version.
Permutations of prime indices matching this pattern are counted by A335510.
Compositions matching this pattern are counted by A335455 and ranked by A335512.
Patterns are counted by A000670 and ranked by A333217.
Patterns matching the pattern (1,1) are counted by A019472.
Combinatory separations are counted by A269134.
Patterns matched by standard compositions are counted by A335454.
Minimal patterns avoided by a standard composition are counted by A335465.
Patterns matching (1,2,3) are counted by A335515.
Cf. A276922.

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n=0, 1, add(
          b(n-i, k)*binomial(n, i), i=1..min(n, k)))
        end:
    a:= n-> b(n$2)-b(n, 2):
    seq(a(n), n=0..21);  # Alois P. Heinz, Jan 28 2024
  • Mathematica
    allnorm[n_]:=If[n<=0,{{}},Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1]];
    Table[Length[Select[Join@@Permutations/@allnorm[n],MatchQ[#,{_,x_,_,x_,_,x_,_}]&]],{n,0,6}]

Formula

a(n) = Sum_{k=3..n} A276922(n,k). - Alois P. Heinz, Jan 28 2024
a(n) = A000670(n) - A080599(n). - Andrew Howroyd, Jan 28 2024

Extensions

a(9)-a(21) from Alois P. Heinz, Jan 28 2024

A335510 Number of (1,1,1)-matching permutations of the prime indices of n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Jun 19 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.
We define a pattern to be a finite sequence covering an initial interval of positive integers. Patterns are counted by A000670 and ranked by A333217. A sequence S is said to match a pattern P if there is a not necessarily contiguous subsequence of S whose parts have the same relative order as P. For example, (3,1,1,3) matches (1,1,2), (2,1,1), and (2,1,2), but avoids (1,2,1), (1,2,2), and (2,2,1).

Crossrefs

Patterns matching this pattern are counted by A335508.
These compositions are counted by A335455.
The (1,1)-matching version is A335487.
The complement A335511 is the avoiding version.
These permutations are ranked by A335512.
Permutations of prime indices are counted by A008480.
Patterns are counted by A000670 and ranked by A333217.
Anti-run permutations of prime indices are counted by A335452.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Length[Select[Permutations[primeMS[n]],MatchQ[#,{_,x_,_,x_,_,x_,_}]&]],{n,0,100}]

Formula

If n is cubefree, a(n) = 0; otherwise a(n) = A008480(n).

A335513 Numbers k such that the k-th composition in standard order (A066099) avoids the pattern (1,1,1).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 28, 32, 33, 34, 35, 36, 37, 38, 40, 41, 43, 44, 45, 46, 48, 49, 50, 52, 53, 54, 56, 58, 64, 65, 66, 67, 68, 69, 70, 72, 73, 74, 75, 76, 77, 78, 80, 81, 82, 83, 84, 88, 89
Offset: 1

Views

Author

Gus Wiseman, Jun 18 2020

Keywords

Comments

These are compositions with no part appearing more than twice.
A composition of n is a finite sequence of positive integers summing to n. 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.
We define a pattern to be a finite sequence covering an initial interval of positive integers. Patterns are counted by A000670 and ranked by A333217. A sequence S is said to match a pattern P if there is a not necessarily contiguous subsequence of S whose parts have the same relative order as P. For example, (3,1,1,3) matches (1,1,2), (2,1,1), and (2,1,2), but avoids (1,2,1), (1,2,2), and (2,2,1).

Examples

			The sequence of terms together with the corresponding compositions begins:
   0: ()         17: (4,1)      37: (3,2,1)
   1: (1)        18: (3,2)      38: (3,1,2)
   2: (2)        19: (3,1,1)    40: (2,4)
   3: (1,1)      20: (2,3)      41: (2,3,1)
   4: (3)        21: (2,2,1)    43: (2,2,1,1)
   5: (2,1)      22: (2,1,2)    44: (2,1,3)
   6: (1,2)      24: (1,4)      45: (2,1,2,1)
   8: (4)        25: (1,3,1)    46: (2,1,1,2)
   9: (3,1)      26: (1,2,2)    48: (1,5)
  10: (2,2)      28: (1,1,3)    49: (1,4,1)
  11: (2,1,1)    32: (6)        50: (1,3,2)
  12: (1,3)      33: (5,1)      52: (1,2,3)
  13: (1,2,1)    34: (4,2)      53: (1,2,2,1)
  14: (1,1,2)    35: (4,1,1)    54: (1,2,1,2)
  16: (5)        36: (3,3)      56: (1,1,4)
		

Crossrefs

These compositions are counted by A232432 (by sum).
The (1,1)-avoiding version is A233564.
The complement A335512 is the matching version.
Constant patterns are counted by A000005 and ranked by A272919.
Permutations are counted by A000142 and ranked by A333218.
Patterns are counted by A000670 and ranked by A333217.
Patterns avoiding (1,1,1) are counted by A080599 (by length).
Non-unimodal compositions are counted by A115981 and ranked by A335373.
Combinatory separations are counted by A269134.
Patterns matched by standard compositions are counted by A335454.
Minimal patterns avoided by a standard composition are counted by A335465.
Permutations of prime indices avoiding (1,1,1) are counted by A335511.

Programs

  • Mathematica
    stc[n_]:=Reverse[Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]];
    Select[Range[0,100],!MatchQ[stc[#],{_,x_,_,x_,_,x_,_}]&]
Showing 1-5 of 5 results.