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.
LINKS
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}]
PROG
(PARI) A356733(n) = if(1==n, 0, my(pis=apply(primepi, factor(n)[, 1])); sum(i=1, #pis, ((n%prime(pis[i]+1)) && (pis[i]==1 || (n%prime(pis[i]-1)))))); \\ Antti Karttunen, Jan 28 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Aug 26 2022
EXTENSIONS
Data section extended to a(105) by Antti Karttunen, Jan 28 2025
STATUS
approved