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.

A335459 Number of permutations of the prime indices of n! with at least one non-singleton run.

Original entry on oeis.org

0, 0, 0, 0, 4, 18, 102, 786, 3960, 51450, 675570, 10804710, 139674024, 2793377664, 58662908640, 1798893694080, 26985313555200, 782574083010720, 25992638958686400, 857757034323189000, 30021498596590300800, 1563341714743040232000, 64179292280096037844800, 2631350957341279888915200
Offset: 0

Views

Author

Gus Wiseman, Jul 03 2020

Keywords

Comments

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.

Examples

			The a(4) = 4 and a(5) = 18 permutations:
  (1,1,1,2)  (1,1,1,2,3)
  (1,1,2,1)  (1,1,1,3,2)
  (1,2,1,1)  (1,1,2,1,3)
  (2,1,1,1)  (1,1,2,3,1)
             (1,1,3,1,2)
             (1,1,3,2,1)
             (1,2,1,1,3)
             (1,2,3,1,1)
             (1,3,1,1,2)
             (1,3,2,1,1)
             (2,1,1,1,3)
             (2,1,1,3,1)
             (2,1,3,1,1)
             (2,3,1,1,1)
             (3,1,1,1,2)
             (3,1,1,2,1)
             (3,1,2,1,1)
             (3,2,1,1,1)
		

Crossrefs

The anti-run version is A335407.
Anti-runs are ranked by A333489.
Anti-run compositions are A003242.
Anti-run patterns are A005649.
Permutations of prime indices are A008480.
Permutations of prime indices of n! are A325617.
Anti-run permutations of prime indices are 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_,_}]&]],{n,0,10}]
  • PARI
    \\ See A335452 for count.
    a(n)={my(sig=factor(n!)[, 2]); vecsum(sig)!/vecprod([k! | k<-sig]) - count(sig)} \\ Andrew Howroyd, Apr 17 2021

Formula

A008480(n!) = a(n) + A335407(n).

Extensions

a(11)-a(13) from Vaclav Kotesovec, Jul 07 2020
Terms a(14) and beyond from Andrew Howroyd, Apr 17 2021