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.

Original entry on oeis.org

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, 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, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 3, 0, 0, 0
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).

Examples

			The a(n) permutations for n = 30, 60, 120, 210, 180, 480:
  (123)  (1123)  (11123)  (1234)  (11223)  (1111123)
         (1213)  (11213)  (1243)  (11232)  (1111213)
         (1231)  (11231)  (1324)  (12123)  (1111231)
                 (12113)  (1342)  (12132)  (1112113)
                 (12131)  (1423)  (12213)  (1112131)
                 (12311)  (2134)  (12231)  (1112311)
                          (2314)  (12312)  (1121113)
                          (2341)  (12321)  (1121131)
                          (3124)  (21123)  (1121311)
                          (4123)  (21213)  (1123111)
                                  (21231)  (1211113)
                                           (1211131)
                                           (1211311)
                                           (1213111)
                                           (1231111)
		

Crossrefs

Positions of nonzero terms are A000977.
These permutations are ranked by A335479.
These compositions are counted by A335514.
Patterns matching this pattern are counted by A335515.
The complement A335521 is the avoiding version.
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_,_,y_,_,z_,_}/;x
    				

Formula

For n > 0, a(n) + A335521(n) = A008480(n).