A257992 Number of even parts in the partition having Heinz number n.
0, 0, 1, 0, 0, 1, 1, 0, 2, 0, 0, 1, 1, 1, 1, 0, 0, 2, 1, 0, 2, 0, 0, 1, 0, 1, 3, 1, 1, 1, 0, 0, 1, 0, 1, 2, 1, 1, 2, 0, 0, 2, 1, 0, 2, 0, 0, 1, 2, 0, 1, 1, 1, 3, 0, 1, 2, 1, 0, 1, 1, 0, 3, 0, 1, 1, 0, 0, 1, 1, 1, 2, 0, 1, 1, 1, 1, 2, 1, 0, 4, 0, 0, 2, 0, 1, 2
Offset: 1
Keywords
Examples
a(18) = 2 because the partition having Heinz number 18 = 2*3*3 is [1,2,2], having 2 even parts.
References
- George E. Andrews and Kimmo Eriksson, Integer Partitions, Cambridge Univ. Press, Cambridge, 2004.
- Miklós Bóna, A Walk Through Combinatorics, World Scientific Publishing Co., 2002.
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..20000
Programs
-
Maple
with(numtheory): a := proc (n) local B, ct, q: B := proc (n) local nn, j, m: nn := op(2, ifactors(n)): for j to nops(nn) do m[j] := op(j, nn) end do: [seq(seq(pi(op(1, m[i])), q = 1 .. op(2, m[i])), i = 1 .. nops(nn))] end proc: ct := 0: for q to nops(B(n)) do if `mod`(B(n)[q], 2) = 0 then ct := ct+1 else end if end do: ct end proc: seq(a(n), n = 1 .. 135); # second Maple program: a:= n-> add(`if`(numtheory[pi](i[1])::even, i[2], 0), i=ifactors(n)[2]): seq(a(n), n=1..120); # Alois P. Heinz, May 09 2016
-
Mathematica
a[n_] := Sum[If[PrimePi[i[[1]]] // EvenQ, i[[2]], 0], {i, FactorInteger[n]} ]; a[1] = 0; Table[a[n], {n, 1, 120}] (* Jean-François Alcover, Dec 10 2016 after Alois P. Heinz *)
Formula
From Amiram Eldar, Jun 17 2024: (Start)
Totally additive with a(p) = 1 if primepi(p) is even, and 0 otherwise.
Comments