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 81-90 of 202 results. Next

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.

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

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 47, 48, 49, 50, 51, 52, 53, 55, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 79, 80, 81
Offset: 1

Views

Author

Gus Wiseman, Jun 18 2020

Keywords

Comments

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

Crossrefs

Patterns avoiding this pattern are counted by A001710 (by length).
Permutations of prime indices avoiding this pattern are counted by A335449.
These compositions are counted by A335471 (by sum).
The complement A335476 is the matching version.
The (2,1,1)-avoiding version is A335523.
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.

Programs

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

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

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 36, 37, 38, 40, 41, 42, 44, 48, 49, 50, 52, 53, 54, 56, 57, 58, 60, 61, 62, 63, 64, 65, 66, 68, 69, 70, 72, 73, 76, 80, 81, 82, 84, 85, 86, 88, 90
Offset: 1

Views

Author

Gus Wiseman, Jun 18 2020

Keywords

Comments

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

Crossrefs

Patterns avoiding this pattern are counted by A001710 (by length).
Permutations of prime indices avoiding this pattern are counted by A335449.
These compositions are counted by A335471 (by sum).
The complement A335478 is the matching version.
The (1,1,2)-avoiding version is A335522.
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.

Programs

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

A158434 Number of permutations of 1..n containing the relative rank sequence { 51342 } at any spacing.

Original entry on oeis.org

1, 26, 460, 7068, 102676, 1466870, 21055493, 307660035, 4616675543, 71598646435, 1153132523804
Offset: 5

Views

Author

R. H. Hardin, Mar 18 2009

Keywords

Comments

Same series for 25341, 41325, 14352, 52314, 24315, 42351, 15324.

Crossrefs

Formula

a(n) = n! - A256200(n). - Alois P. Heinz, May 19 2020

A178346 Triangle read by rows: T(n, k, m) = binomial(n, k) - m*binomial(n, k)*binomial(n+1, k)/(k+1) + m*A008292(n+1, k+1) with m = 3.

Original entry on oeis.org

1, 1, 1, 1, 5, 1, 1, 18, 18, 1, 1, 52, 144, 52, 1, 1, 131, 766, 766, 131, 1, 1, 303, 3273, 6743, 3273, 303, 1, 1, 664, 12312, 45422, 45422, 12312, 664, 1, 1, 1406, 42844, 261230, 463348, 261230, 42844, 1406, 1, 1, 2913, 141936, 1358100, 3915312, 3915312, 1358100, 141936, 2913, 1, 1, 5953, 455481, 6595734, 29172972, 47114784, 29172972, 6595734, 455481, 5953, 1
Offset: 0

Views

Author

Roger L. Bagula, May 25 2010

Keywords

Examples

			Triangle begins as:
  1;
  1,    1;
  1,    5,      1;
  1,   18,     18,       1;
  1,   52,    144,      52,       1;
  1,  131,    766,     766,     131,       1;
  1,  303,   3273,    6743,    3273,     303,       1;
  1,  664,  12312,   45422,   45422,   12312,     664,      1;
  1, 1406,  42844,  261230,  463348,  261230,   42844,   1406,    1;
  1, 2913, 141936, 1358100, 3915312, 3915312, 1358100, 141936, 2913,   1;
		

Crossrefs

Cf. A008292.

Programs

  • Magma
    A178346:= func< n,k | Binomial(n, k) - 3*(Binomial(n, k)*Binomial(n+1, k)/(k+1)) + 3*EulerianNumber(n+1, k) >;
    [A178346(n,k): k in [0..n], n in [0..15]]; // G. C. Greubel, Oct 05 2024
    
  • Mathematica
    EulerianNumber[n_, k_] := EulerianNumber[n, k] = Sum[(-1)^j*(k-j)^n*Binomial[n+ 1, j], {j,0,k}];
    A178346[n_, k_, m_]:= Binomial[n, k] - m*Binomial[n, k]*Binomial[n+1, k]/(k+1) + m*EulerianNumber[n+1, k+1];
    Table[A178346[n,k,3], {n,0,15}, {k,0,n}]//Flatten
  • SageMath
    def A008292(n,k): return sum((-1)^j*binomial(n+1, j)*(k-j)^n for j in (0..k))
    def A178346(n,k): return binomial(n,k) - 3*binomial(n,k)*binomial(n+1,k)/(k+1) + 3*A008292(n+1,k+1)
    flatten([[A178346(n,k) for k in range(n+1)] for n in range(16)]) # G. C. Greubel, Oct 05 2024

Formula

T(n, k, m) = binomial(n, k) - m*binomial(n, k)*binomial(n+1, k)/(k+1) + m*Eulerian(n+1, k+1) with m = 3, and Eulerian(n,k) = A008292(n,k).
Sum_{k=0..n} T(n, k) = 2^n + 3*(n+1)! - 3*Catalan(n+1) = 2^n + 3*A056986(n+1). - G. C. Greubel, Oct 05 2024

Extensions

Edited by G. C. Greubel, Oct 05 2024

A335518 Number of matching pairs of patterns, the first of length n and the second of length k.

Original entry on oeis.org

1, 1, 1, 3, 3, 3, 13, 13, 25, 13, 75, 75, 185, 213, 75, 541, 541, 1471, 2719, 2053, 541, 4683, 4683, 13265, 32973, 40367, 22313, 4683, 47293, 47293, 136711, 408265, 713277, 625295, 271609, 47293
Offset: 0

Views

Author

Gus Wiseman, Jun 23 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

			Triangle begins:
     1
     1     1
     3     3     3
    13    13    25    13
    75    75   185   213    75
   541   541  1471  2719  2053   541
  4683  4683 13265 32973 40367 22313  4683
Row n =2 counts the following pairs:
  ()<=(1,1)  (1)<=(1,1)  (1,1)<=(1,1)
  ()<=(1,2)  (1)<=(1,2)  (1,2)<=(1,2)
  ()<=(2,1)  (1)<=(2,1)  (2,1)<=(2,1)
		

Crossrefs

Columns k = 0 and k = 1 are both A000670.
Row sums are A335517.
Patterns are ranked by A333217.
Patterns matched by a standard composition are counted by A335454.
Patterns contiguously matched by compositions are counted by A335457.
Minimal patterns avoided by a standard composition are counted by A335465.
Patterns matched by prime indices are counted by A335549.

Programs

  • Mathematica
    mstype[q_]:=q/.Table[Union[q][[i]]->i,{i,Length[Union[q]]}];
    allnorm[n_]:=If[n<=0,{{}},Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1]];
    Table[Sum[Length[Union[mstype/@Subsets[y,{k}]]],{y,Join@@Permutations/@allnorm[n]}],{n,0,5},{k,0,n}]

A158424 Number of permutations of 1..n containing the relative rank sequence { 41235 } at any spacing.

Original entry on oeis.org

1, 26, 459, 7037, 102075, 1457407, 20922336, 305907060, 4594540541, 71326622649, 1149849718045
Offset: 5

Views

Author

R. H. Hardin Mar 18 2009

Keywords

Comments

Same series for 43251 23415 15234 51432 25431 13452 53214

Crossrefs

A158425 Number of permutations of 1..n containing the relative rank sequence { 41352 } at any spacing.

Original entry on oeis.org

1, 26, 462, 7136, 104123, 1491822, 21438666, 313144000, 4691684510, 72594030500
Offset: 5

Views

Author

R. H. Hardin Mar 18 2009

Keywords

Comments

Same series for 25314

Crossrefs

A158426 Number of permutations of 1..n containing the relative rank sequence { 41523 } at any spacing.

Original entry on oeis.org

1, 26, 460, 7071, 102788, 1469419, 21101676, 308396208, 4627521637, 71750494216, 1155187096545
Offset: 5

Views

Author

R. H. Hardin Mar 18 2009

Keywords

Comments

Same series for 32514 34152 25143 24513 42153 31542 35124

Crossrefs

A158427 Number of permutations of 1..n containing the relative rank sequence { 41532 } at any spacing.

Original entry on oeis.org

1, 26, 461, 7102, 103397, 1479242, 21244523, 310353510, 4653395194, 72084982176, 1159451127978
Offset: 5

Views

Author

R. H. Hardin Mar 18 2009

Keywords

Comments

Same series for 35214 31452 41253 25413 23514 43152 25134

Crossrefs

Previous Showing 81-90 of 202 results. Next