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

A335511 Number of (1,1,1)-avoiding permutations of the prime indices of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 0, 1, 2, 1, 3, 1, 2, 2, 0, 1, 3, 1, 3, 2, 2, 1, 0, 1, 2, 0, 3, 1, 6, 1, 0, 2, 2, 2, 6, 1, 2, 2, 0, 1, 6, 1, 3, 3, 2, 1, 0, 1, 3, 2, 3, 1, 0, 2, 0, 2, 2, 1, 12, 1, 2, 3, 0, 2, 6, 1, 3, 2, 6, 1, 0, 1, 2, 3, 3, 2, 6, 1, 0, 0, 2, 1, 12, 2, 2
Offset: 1

Views

Author

Gus Wiseman, Jun 19 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).

Crossrefs

Patterns avoiding this pattern are counted by A080599.
These compositions are counted by A232432.
The (1,1)-avoiding version is A335451.
The complement A335510 is the matching version.
These permutations are ranked by A335513.
Patterns are counted by A000670 and ranked by A333217.
Permutations of prime indices are counted by A008480.
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,100}]

Formula

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

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

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

Original entry on oeis.org

7, 15, 23, 27, 29, 30, 31, 39, 42, 47, 51, 55, 57, 59, 60, 61, 62, 63, 71, 79, 85, 86, 87, 90, 91, 93, 94, 95, 99, 103, 106, 107, 109, 110, 111, 113, 115, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 135, 143, 151, 155, 157, 158, 159, 167, 170, 171
Offset: 1

Views

Author

Gus Wiseman, Jun 18 2020

Keywords

Comments

These are compositions with some 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:
   7: (1,1,1)
  15: (1,1,1,1)
  23: (2,1,1,1)
  27: (1,2,1,1)
  29: (1,1,2,1)
  30: (1,1,1,2)
  31: (1,1,1,1,1)
  39: (3,1,1,1)
  42: (2,2,2)
  47: (2,1,1,1,1)
  51: (1,3,1,1)
  55: (1,2,1,1,1)
  57: (1,1,3,1)
  59: (1,1,2,1,1)
  60: (1,1,1,3)
		

Crossrefs

The complement A335513 is the avoiding version.
Patterns matching this pattern are counted by A335508 (by length).
Permutations of prime indices matching this pattern are counted by A335510.
These compositions are counted by A335455 (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)-matching version is A335488.

Programs

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

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

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 3, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0, 4, 1, 0, 1, 3, 0, 0, 0, 1, 0, 0, 0, 6, 0, 0, 0, 4, 0, 0, 0, 3, 3, 0, 0, 5, 1, 3, 0, 3, 0, 4, 0, 4, 0, 0, 0, 12, 0, 0, 3, 1, 0, 0, 0, 3, 0, 0, 0, 10, 0, 0, 3, 3, 0, 0, 0, 5, 1, 0, 0, 12, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Jun 14 2020

Keywords

Comments

Depends only on sorted prime signature (A118914).
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. 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(n) permutations for n = 4, 12, 24, 48, 36, 72, 60:
  (11)  (112)  (1112)  (11112)  (1122)  (11122)  (1123)
        (121)  (1121)  (11121)  (1212)  (11212)  (1132)
        (211)  (1211)  (11211)  (1221)  (11221)  (1213)
               (2111)  (12111)  (2112)  (12112)  (1231)
                       (21111)  (2121)  (12121)  (1312)
                                (2211)  (12211)  (1321)
                                        (21112)  (2113)
                                        (21121)  (2131)
                                        (21211)  (2311)
                                        (22111)  (3112)
                                                 (3121)
                                                 (3211)
		

Crossrefs

Positions of zeros are A005117 (squarefree numbers).
The case where the match must be contiguous is A333175.
The avoiding version is A335489.
The (1,1,1)-matching case is A335510.
Patterns are counted by A000670.
Permutations of prime indices are counted by A008480.
(1,1)-matching patterns are counted by A019472.
(1,1)-matching compositions are counted by A261982.
STC-numbers of permutations of prime indices are A333221.
Patterns matched by standard compositions are counted by A335454.
Dimensions of downsets of standard compositions are A335465.
(1,1)-matching compositions are ranked by A335488.

Programs

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

Formula

a(n) = 0 if n is squarefree, otherwise a(n) = A008480(n).
a(n) = A008480(n) - A281188(n) for n != 4.
Showing 1-5 of 5 results.