OFFSET
1,6
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).
LINKS
FORMULA
If n is cubefree, a(n) = A008480(n), otherwise a(n) = 0.
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}]
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.
Permutations of prime indices are counted by A008480.
Anti-run permutations of prime indices are counted by A335452.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jun 19 2020
STATUS
approved