cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A257988 Number of parts that are larger than the number of 1's in the partition having Heinz number n.

Original entry on oeis.org

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

Views

Author

Emeric Deutsch, May 16 2015

Keywords

Comments

We define the Heinz number of a partition p = [p_1, p_2, ..., p_r] to be Product(p_j-th prime, j=1...r) (a concept used by Alois P. Heinz in A215366 as an "encoding" of a partition). For example, for the partition [1, 1, 2, 4, 10] we get 2*2*3*7*29 = 2436.
In the Maple program the subprogram b yields the number of 1's in the partition having Heinz number n and the subprogram B yields the partition having Heinz number n.
The considered partition statistic is needed in the partition statistic "crank" (A257989).

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).
		

Crossrefs

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 *)