A357706
Numbers k such that the k-th composition in standard order has half-alternating sum and skew-alternating sum both 0.
Original entry on oeis.org
0, 15, 45, 54, 59, 153, 170, 179, 204, 213, 230, 235, 247, 255, 561, 594, 611, 660, 677, 710, 715, 727, 735, 750, 765, 792, 809, 842, 851, 871, 879, 894, 908, 917, 934, 939, 951, 959, 973, 982, 987, 1005, 1014, 1019
Offset: 1
These compositions are counted by
A228248.
-
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
halfats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[i/2]),{i,Length[f]}];
skats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[(i+1)/2]),{i,Length[f]}];
Select[Range[0,1000],halfats[stc[#]]==0&&skats[stc[#]]==0&]
A357851
Numbers k such that the half-alternating sum of the prime indices of k is 1.
Original entry on oeis.org
2, 8, 18, 32, 45, 50, 72, 98, 105, 128, 162, 180, 200, 231, 242, 275, 288, 338, 392, 420, 429, 450, 455, 512, 578, 648, 663, 720, 722, 800, 833, 882, 924, 935, 968, 969, 1050, 1058, 1100, 1125, 1152, 1235, 1250, 1311, 1352, 1458, 1463, 1568, 1680, 1682, 1716
Offset: 1
The terms together with their prime indices begin:
2: {1}
8: {1,1,1}
18: {1,2,2}
32: {1,1,1,1,1}
45: {2,2,3}
50: {1,3,3}
72: {1,1,1,2,2}
98: {1,4,4}
105: {2,3,4}
128: {1,1,1,1,1,1,1}
162: {1,2,2,2,2}
180: {1,1,2,2,3}
200: {1,1,1,3,3}
The version for original alternating sum is
A001105.
Partitions with these Heinz numbers are counted by
A035444, skew
A035544.
A351005 = alternately equal and unequal partitions, compositions
A357643.
A351006 = alternately unequal and equal partitions, compositions
A357644.
-
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]}];
Select[Range[1000],halfats[primeMS[#]]==1&]
Comments