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 A257994 #24 Nov 03 2023 11:21:30 %S A257994 0,0,1,0,1,1,0,0,2,1,1,1,0,0,2,0,1,2,0,1,1,1,0,1,2,0,3,0,0,2,1,0,2,1, %T A257994 1,2,0,0,1,1,1,1,0,1,3,0,0,1,0,2,2,0,0,3,2,0,1,0,1,2,0,1,2,0,1,2,1,1, %U A257994 1,1,0,2,0,0,3,0,1,1,0,1,4,1,1,1,2,0,1,1,0,3 %N A257994 Number of prime parts in the partition having Heinz number n. %C A257994 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 A257994 In the Maple program the subprogram B yields the partition with Heinz number n. %C A257994 The number of nonprime parts is given by A330944, so A001222(n) = a(n) + A330944(n). - _Gus Wiseman_, Jan 17 2020 %D A257994 George E. Andrews and Kimmo Eriksson, Integer Partitions, Cambridge Univ. Press, Cambridge, 2004. %H A257994 Alois P. Heinz, <a href="/A257994/b257994.txt">Table of n, a(n) for n = 1..20000</a> %F A257994 Additive with a(p^e) = e if primepi(p) is prime, and 0 otherwise. - _Amiram Eldar_, Nov 03 2023 %e A257994 a(30) = 2 because the partition with Heinz number 30 = 2*3*5 is [1,2,3], having 2 prime parts. %p A257994 with(numtheory): a := proc (n) local B, ct, s: 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 s to nops(B(n)) do if isprime(B(n)[s]) = true then ct := ct+1 else end if end do: ct end proc: seq(a(n), n = 1 .. 130); %t A257994 B[n_] := Module[{nn, j, m}, nn = FactorInteger[n]; For[j = 1, j <= Length[nn], j++, m[j] = nn[[j]]]; Flatten[Table[Table[PrimePi[ m[i][[1]]], {q, 1, m[i][[2]]}], {i, 1, Length[nn]}]]]; %t A257994 a[n_] := Module[{ct, s}, ct = 0; For[s = 1, s <= Length[B[n]], s++, If[ PrimeQ[B[n][[s]]], ct++]]; ct]; %t A257994 Table[a[n], {n, 1, 130}] (* _Jean-François Alcover_, Apr 25 2017, translated from Maple *) %t A257994 Table[Total[Cases[FactorInteger[n],{p_,k_}/;PrimeQ[PrimePi[p]]:>k]],{n,30}] (* _Gus Wiseman_, Jan 17 2020 *) %o A257994 (PARI) a(n) = my(f = factor(n)); sum(i=1, #f~, if(isprime(primepi(f[i, 1])), f[i, 2], 0)); \\ _Amiram Eldar_, Nov 03 2023 %Y A257994 Positions of positive terms are A331386. %Y A257994 Primes of prime index are A006450. %Y A257994 Products of primes of prime index are A076610. %Y A257994 The number of nonprime prime indices is A330944. %Y A257994 Cf. A000040, A000720, A001222, A007821, A018252, A056239, A112798, A215366, A279952, A302242, A320628, A330945. %K A257994 nonn,easy %O A257994 1,9 %A A257994 _Emeric Deutsch_, May 20 2015