A257988 Number of parts that are larger than the number of 1's in the partition having Heinz number n.
0, 0, 1, 0, 1, 1, 1, 0, 2, 1, 1, 0, 1, 1, 2, 0, 1, 2, 1, 1, 2, 1, 1, 0, 2, 1, 3, 1, 1, 2, 1, 0, 2, 1, 2, 0, 1, 1, 2, 0, 1, 2, 1, 1, 3, 1, 1, 0, 2, 2, 2, 1, 1, 3, 2, 1, 2, 1, 1, 1, 1, 1, 3, 0, 2, 2, 1, 1, 2, 2, 1, 0, 1, 1, 3, 1, 2, 2, 1, 0, 4, 1, 1, 1, 2, 1, 2, 1, 1, 3, 2, 1, 2, 1, 2, 0, 1, 2, 3, 2, 1, 2, 1
Offset: 1
Keywords
Examples
a(252) = 1 because the partition having Heinz number 252 = 2^2 * 3^2 * 7 is [1,1,2,2,4] and exactly one part, namely 4, is larger than 2 (the number of 1's). a(945) = 5 because the partition having Heinz number 945 = 3^3 * 5 * 7 is [2,2,2,3,4] and all parts are larger than 0 (the number of 1's).
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..20000
- G. E. Andrews and F. G. Garvan, Dyson's crank of a partition, Bull. Amer. Math. Soc., 18 (1988), 167-171.
Programs
-
Maple
with(numtheory): a := proc (n) local b, B, c, i: b := proc (n) if `mod`(n, 2) = 1 then 0 else 1+b((1/2)*n) end if end proc: 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: c := 0: for i to bigomega(n) do if b(n) < B(n)[i] then c := c+1 else end if end do: c end proc: seq(a(n), n = 1 .. 150); # second Maple program: a:= n->(l->nops(select(x->x>add(`if`(i=1, 1, 0), i=l), l)))( [seq(numtheory[pi](i[1])$i[2], i=ifactors(n)[2])]): seq(a(n), n=1..100); # Alois P. Heinz, May 10 2016
-
Mathematica
a[n_] := Function[l, Length[Select[l, # > Sum[If[i == 1, 1, 0], {i, l}]&]]][Flatten @ Table[Array[PrimePi[i[[1]]]&, i[[2]]], {i, FactorInteger[n]}] ]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Dec 10 2016 after Alois P. Heinz *)
Comments