OFFSET
1,4
COMMENTS
An anti-run is a sequence with no adjacent equal parts.
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.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..200
EXAMPLE
The a(1) = 1 through a(10) = 6 permutations:
() (2) (4) (2,3) (11) (2,4,2) (31) (2,3,7) (21,4) (11,2,5)
(3,2) (2,7,3) (4,21) (11,5,2)
(3,2,7) (2,11,5)
(3,7,2) (2,5,11)
(7,2,3) (5,11,2)
(7,3,2) (5,2,11)
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
Table[Length[Select[Permutations[primeMS[2^n-1]], !MatchQ[#, {___, x_, x_, ___}]&]], {n, 0, 30}]
PROG
(PARI) \\ See A335452 for count.
a(n) = {count(factor(2^n-1)[, 2])} \\ Andrew Howroyd, Feb 03 2021
CROSSREFS
The version for factorial numbers is A335407.
Anti-run compositions are A003242.
Anti-run patterns are A005649.
Permutations of prime indices are A008480.
Anti-runs are ranked by A333489.
Separable partitions are ranked by A335433.
Inseparable partitions are ranked by A335448.
Anti-run permutations of prime indices are A335452.
Strict permutations of prime indices are A335489.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jul 02 2020
EXTENSIONS
Terms a(51) and beyond from Andrew Howroyd, Feb 03 2021
STATUS
approved