login
Skew-alternating sum of the partition having Heinz number n.
21

%I #5 Oct 09 2022 20:26:12

%S 0,1,2,0,3,1,4,-1,0,2,5,0,6,3,1,0,7,-1,8,1,2,4,9,1,0,5,-2,2,10,0,11,1,

%T 3,6,1,0,12,7,4,2,13,1,14,3,-1,8,15,2,0,-1,5,4,16,-1,2,3,6,9,17,1,18,

%U 10,0,0,3,2,19,5,7,0,20,1,21,11,-2,6,1,3,22,3

%N Skew-alternating sum of the partition having Heinz number n.

%C We define the skew-alternating sum of a sequence (A, B, C, D, E, F, G, ...) to be A - B - C + D + E - F - G + ....

%C 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.

%e The partition with Heinz number 525 is (4,3,3,2) so a(525) = 4 - 3 - 3 + 2 = 0.

%t primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];

%t skats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[(i+1)/2]),{i,Length[f]}];

%t Table[skats[Reverse[primeMS[n]]],{n,30}]

%Y The original alternating sum is A316524, reverse A344616.

%Y The non-reverse version is A357630.

%Y The half-alternating form is A357633, non-reverse A357629.

%Y Positions of zeros are A357636, non-reverse A357632.

%Y The version for standard compositions is A357624, non-reverse A357623.

%Y These partitions are counted by A357638, half A357637.

%Y A056239 adds up prime indices, row sums of A112798.

%Y A351005 = alternately equal and unequal partitions, compositions A357643.

%Y A351006 = alternately unequal and equal partitions, compositions A357644.

%Y A357641 counts comps w/ half-alt sum 0, partitions A357639, even A357642.

%Y Cf. A003963, A053251, A055932, A357189, A357485-A357488, A357621, A357622, A357625, A357626, A357635, A357640.

%K sign

%O 1,3

%A _Gus Wiseman_, Oct 09 2022