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.

A335520 Number of (1,2,3)-matching permutations of the prime indices of n.

This page as a plain text file.
%I A335520 #8 Jun 30 2020 07:59:28
%S A335520 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,
%T A335520 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,1,0,0,
%U A335520 0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,3,0,0,0
%N A335520 Number of (1,2,3)-matching permutations of the prime indices of n.
%C A335520 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).
%H A335520 Wikipedia, <a href="https://en.wikipedia.org/wiki/Permutation_pattern">Permutation pattern</a>
%H A335520 Gus Wiseman, <a href="https://oeis.org/A102726/a102726.txt">Sequences counting and ranking compositions by the patterns they match or avoid.</a>
%F A335520 For n > 0, a(n) + A335521(n) = A008480(n).
%e A335520 The a(n) permutations for n = 30, 60, 120, 210, 180, 480:
%e A335520   (123)  (1123)  (11123)  (1234)  (11223)  (1111123)
%e A335520          (1213)  (11213)  (1243)  (11232)  (1111213)
%e A335520          (1231)  (11231)  (1324)  (12123)  (1111231)
%e A335520                  (12113)  (1342)  (12132)  (1112113)
%e A335520                  (12131)  (1423)  (12213)  (1112131)
%e A335520                  (12311)  (2134)  (12231)  (1112311)
%e A335520                           (2314)  (12312)  (1121113)
%e A335520                           (2341)  (12321)  (1121131)
%e A335520                           (3124)  (21123)  (1121311)
%e A335520                           (4123)  (21213)  (1123111)
%e A335520                                   (21231)  (1211113)
%e A335520                                            (1211131)
%e A335520                                            (1211311)
%e A335520                                            (1213111)
%e A335520                                            (1231111)
%t A335520 primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
%t A335520 Table[Length[Select[Permutations[primeMS[n]],MatchQ[#,{___,x_,___,y_,___,z_,___}/;x<y<z]&]],{n,100}]
%Y A335520 Positions of nonzero terms are A000977.
%Y A335520 These permutations are ranked by A335479.
%Y A335520 These compositions are counted by A335514.
%Y A335520 Patterns matching this pattern are counted by A335515.
%Y A335520 The complement A335521 is the avoiding version.
%Y A335520 Permutations of prime indices are counted by A008480.
%Y A335520 Patterns are counted by A000670 and ranked by A333217.
%Y A335520 Anti-run permutations of prime indices are counted by A335452.
%Y A335520 Cf. A056239, A056986, A112798, A238279, A281188, A333221, A333755, A335456, A335460, A335462, A335463.
%K A335520 nonn
%O A335520 1,60
%A A335520 _Gus Wiseman_, Jun 19 2020