OFFSET
1,10
COMMENTS
A part x is neighborless if neither x - 1 nor x + 1 are parts.
The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.
EXAMPLE
The prime indices of 42 are {1,2,4}, of which only 4 is neighborless, so a(42) = 1.
The prime indices of 462 are {1,2,4,5}, all of which have neighbors, so a(462) = 0.
The prime indices of 1300 are {1,1,3,3,6}, with neighborless parts {1,3,6}, so a(1300) = 3.
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
Table[Length[Select[Union[primeMS[n]], !MemberQ[primeMS[n], #-1]&&!MemberQ[primeMS[n], #+1]&]], {n, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Aug 26 2022
STATUS
approved