A357633 Half-alternating sum of the partition having Heinz number n.
0, 1, 2, 2, 3, 3, 4, 1, 4, 4, 5, 2, 6, 5, 5, 0, 7, 3, 8, 3, 6, 6, 9, 1, 6, 7, 2, 4, 10, 4, 11, 1, 7, 8, 7, 2, 12, 9, 8, 2, 13, 5, 14, 5, 3, 10, 15, 2, 8, 5, 9, 6, 16, 1, 8, 3, 10, 11, 17, 3, 18, 12, 4, 2, 9, 6, 19, 7, 11, 6, 20, 3, 21, 13, 4, 8, 9, 7, 22, 3, 0
Offset: 1
Keywords
Examples
The partition with Heinz number 525 is (4,3,3,2) so a(525) = 4 + 3 - 3 - 2 = 2.
Crossrefs
The reverse version is A357629.
Programs
-
Mathematica
primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]; halfats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[i/2]),{i,Length[f]}]; Table[halfats[Reverse[primeMS[n]]],{n,30}]
Comments