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.
%I A257991 #19 Jun 17 2024 07:15:08 %S A257991 0,1,0,2,1,1,0,3,0,2,1,2,0,1,1,4,1,1,0,3,0,2,1,3,2,1,0,2,0,2,1,5,1,2, %T A257991 1,2,0,1,0,4,1,1,0,3,1,2,1,4,0,3,1,2,0,1,2,3,0,1,1,3,0,2,0,6,1,2,1,3, %U A257991 1,2,0,3,1,1,2,2,1,1,0,5,0,2,1,2,2,1,0,4 %N A257991 Number of odd parts in the partition having Heinz number n. %C A257991 We define the Heinz number of a partition p = [p_1, p_2, ..., p_r] as Product(p_j-th prime, j=1...r) (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. %C A257991 In the Maple program the subprogram B yields the partition with Heinz number n. %D A257991 George E. Andrews and Kimmo Eriksson, Integer Partitions, Cambridge Univ. Press, Cambridge, 2004. %D A257991 Miklós Bóna, A Walk Through Combinatorics, World Scientific Publishing Co., 2002. %H A257991 Alois P. Heinz, <a href="/A257991/b257991.txt">Table of n, a(n) for n = 1..20000</a> %F A257991 From _Amiram Eldar_, Jun 17 2024: (Start) %F A257991 Totally additive with a(p) = 1 if primepi(p) is odd, and 0 otherwise. %F A257991 a(n) = A257992(n) + A195017(n). (End) %e A257991 a(12) = 2 because the partition having Heinz number 12 = 2*2*3 is [1,1,2], having 2 odd parts. %p A257991 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) = 1 then ct := ct+1 else end if end do: ct end proc: seq(a(n), n = 1 .. 135); %p A257991 # second Maple program: %p A257991 a:= n-> add(`if`(numtheory[pi](i[1])::odd, i[2], 0), i=ifactors(n)[2]): %p A257991 seq(a(n), n=1..120); # _Alois P. Heinz_, May 09 2016 %t A257991 a[n_] := Sum[If[PrimePi[i[[1]]] // OddQ, i[[2]], 0], {i, FactorInteger[n]} ]; Table[a[n], {n, 1, 120}] (* _Jean-François Alcover_, Dec 10 2016, after _Alois P. Heinz_ *) %Y A257991 Cf. A001222, A195017, A215366, A257992. %K A257991 nonn %O A257991 1,4 %A A257991 _Emeric Deutsch_, May 18 2015