login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A257994 Number of prime parts in the partition having Heinz number n. 20
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, 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, 1, 1, 0, 2, 0, 0, 3, 0, 1, 1, 0, 1, 4, 1, 1, 1, 2, 0, 1, 1, 0, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,9

COMMENTS

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.

In the Maple program the subprogram B yields the partition with Heinz number n.

The number of nonprime parts is given by A330944, so A001222(n) = a(n) + A330944(n). - Gus Wiseman, Jan 17 2020

REFERENCES

G. E. Andrews, K. Eriksson, Integer Partitions, Cambridge Univ. Press, 2004, Cambridge.

LINKS

Alois P. Heinz, Table of n, a(n) for n = 1..20000

EXAMPLE

a(30) = 2 because the partition with Heinz number 30 = 2*3*5 is [1,2,3], having 2 prime parts.

MAPLE

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

MATHEMATICA

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]}]]];

a[n_] := Module[{ct, s}, ct = 0; For[s = 1, s <= Length[B[n]], s++, If[ PrimeQ[B[n][[s]]], ct++]]; ct];

Table[a[n], {n, 1, 130}] (* Jean-Fran├žois Alcover, Apr 25 2017, translated from Maple *)

Table[Total[Cases[FactorInteger[n], {p_, k_}/; PrimeQ[PrimePi[p]]:>k]], {n, 30}] (* Gus Wiseman, Jan 17 2020 *)

CROSSREFS

Positions of positive terms are A331386.

Primes of prime index are A006450.

Products of primes of prime index are A076610.

The number of nonprime prime indices is A330944.

Cf. A000040, A000720, A001222, A007821, A018252, A056239, A112798, A215366, A302242, A320628, A330945.

Sequence in context: A068462 A054973 A030351 * A188921 A334568 A072617

Adjacent sequences:  A257991 A257992 A257993 * A257995 A257996 A257997

KEYWORD

nonn

AUTHOR

Emeric Deutsch, May 20 2015

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 14 21:27 EDT 2021. Contains 345041 sequences. (Running on oeis4.)