A344616 Alternating sum of the integer partition with Heinz number n.
0, 1, 2, 0, 3, 1, 4, 1, 0, 2, 5, 2, 6, 3, 1, 0, 7, 1, 8, 3, 2, 4, 9, 1, 0, 5, 2, 4, 10, 2, 11, 1, 3, 6, 1, 0, 12, 7, 4, 2, 13, 3, 14, 5, 3, 8, 15, 2, 0, 1, 5, 6, 16, 1, 2, 3, 6, 9, 17, 1, 18, 10, 4, 0, 3, 4, 19, 7, 7, 2, 20, 1, 21, 11, 2, 8, 1, 5, 22, 3, 0, 12
Offset: 1
Keywords
Examples
The partition (6,4,3,2,2) has Heinz number 4095 and conjugate (5,5,3,2,1,1), so a(4095) = 5.
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..20000
Crossrefs
Positions of nonzeros are A000037.
Positions of 0's are A000290.
A version for compositions is A124754.
The version for prime multiplicities is A316523.
A000041 counts partitions of 2n with alternating sum 0.
A103919 counts partitions by sum and alternating sum.
A335433 ranks separable partitions.
A335448 ranks inseparable partitions.
A344606 counts wiggly permutations of prime indices with twins.
A344610 counts partitions by sum and positive reverse-alternating sum.
A344612 counts partitions by sum and reverse-alternating sum.
A344618 gives reverse-alternating sums of standard compositions.
Programs
-
Maple
a:= n-> (l-> -add(l[i]*(-1)^i, i=1..nops(l)))(sort(map( i-> numtheory[pi](i[1])$i[2], ifactors(n)[2]), `>`)): seq(a(n), n=1..82); # Alois P. Heinz, Jun 04 2021
-
Mathematica
primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]; ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}]; Table[ats[Reverse[primeMS[n]]],{n,100}]
Comments