OFFSET
1,2
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.
We define a (normal) 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 contiguously match a pattern P if there is a contiguous subsequence of S whose parts have the same relative order as P. For example, (3,1,1,3) contiguously matches (1,1,2) and (2,1,1) but not (2,1,2), (1,2,1), (1,2,2), or (2,2,1).
LINKS
EXAMPLE
The a(n) patterns for n = 2, 30, 12, 60, 120, 540, 1500:
() () () () () () ()
(1) (1) (1) (1) (1) (1) (1)
(12) (11) (11) (11) (11) (11)
(123) (12) (12) (12) (12) (12)
(112) (112) (111) (111) (111)
(123) (112) (112) (112)
(1123) (123) (122) (122)
(1112) (1112) (123)
(1123) (1122) (1123)
(11123) (1222) (1222)
(11222) (1233)
(12223) (11233)
(112223) (12333)
(112333)
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
mstype[q_]:=q/.Table[Union[q][[i]]->i, {i, Length[Union[q]]}];
Table[Length[Union[mstype/@ReplaceList[primeMS[n], {___, s___, ___}:>{s}]]], {n, 100}]
CROSSREFS
The version for standard compositions is A335458.
The not necessarily contiguous version is A335549.
A number's prime indices are given in the rows of A112798.
Contiguous subsequences of standard compositions are A124771.
Contiguous sub-partitions of prime indices are counted by A335519.
Minimal avoided patterns of prime indices are counted by A335550.
Patterns contiguously matched by partitions are counted by A335838.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jun 26 2020
STATUS
approved