A356735 Number of distinct parts that have neighbors in the integer partition with Heinz number n.
0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 2, 0, 0, 2, 0, 2, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 3
Offset: 1
Keywords
Examples
The prime indices of 42 are {1,2,4}, of which 1 and 2 have neighbors, so a(42) = 2. The prime indices of 462 are {1,2,4,5}, all of which have neighbors, so a(462) = 4. The prime indices of 990 are {1,2,2,3,5}, of which 1, 2, and 3 have neighbors, so a(990) = 3. The prime indices of 1300 are {1,1,3,3,6}, none of which have neighbors, so a(1300) = 0.
Links
Crossrefs
The complement is counted by A356733.
Positions of zeros are A356734.
Positions of positive terms are A356736.
A356226 lists the lengths of maximal gapless submultisets of prime indices:
- minimum: A356227
- maximum: A356228
- bisected length: A356229
- standard composition: A356230
- Heinz number: A356231
- positions of first appearances: A356232
Programs
-
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}]
-
PARI
A356735(n) = if(1==n,0,my(pis=apply(primepi,factor(n)[,1])); omega(n)-sum(i=1, #pis, ((n%prime(pis[i]+1)) && (pis[i]==1 || (n%prime(pis[i]-1)))))); \\ Antti Karttunen, Jan 28 2025
Extensions
Data section extended to a(105) by Antti Karttunen, Jan 28 2025
Comments