|
|
A079067
|
|
Number of primes less than greatest prime factor of n but not dividing n.
|
|
12
|
|
|
0, 0, 1, 0, 2, 0, 3, 0, 1, 1, 4, 0, 5, 2, 1, 0, 6, 0, 7, 1, 2, 3, 8, 0, 2, 4, 1, 2, 9, 0, 10, 0, 3, 5, 2, 0, 11, 6, 4, 1, 12, 1, 13, 3, 1, 7, 14, 0, 3, 1, 5, 4, 15, 0, 3, 2, 6, 8, 16, 0, 17, 9, 2, 0, 4, 2, 18, 5, 7, 1, 19, 0, 20, 10, 1, 6, 3, 3, 21, 1, 1, 11, 22, 1, 5, 12, 8, 3, 23, 0, 4, 7, 9, 13, 6, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,5
|
|
COMMENTS
|
For n >= 2, a(n) is the largest part minus the number of distinct parts of the partition having Heinz number n. The Heinz number of a partition [i_1, i_2, ..., i_r] is defined as Product_{j=1..r} (i_j-th prime) (concept used by Alois P. Heinz in A215366 as an encoding of a partition). For example, for the partition [1, 1, 1, 4] we get 2*2*2*7 = 56; a(56) = 4 - #{1,4} = 2. - Emeric Deutsch, Jun 09 2015 [edited by Peter Munn, Apr 09 2024]
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 0 iff n = m*prime(k)#, where prime(k)# is the k-th primorial (A002110(k)) and A006530(m) <= A000040(k).
|
|
MAPLE
|
with(numtheory): a := proc (n) local B: 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: max(B(n))-nops(convert(B(n), set)) end proc: 0, seq(a(n), n = 2 .. 96); # The subprogram B yields the partition having Heinz number n. # Emeric Deutsch, Jun 09 2015
# second Maple program:
with(numtheory):
a:= n-> (s-> pi(max(0, s))-nops(s))(factorset(n)):
|
|
MATHEMATICA
|
a[1] = 0; a[n_] := With[{fi = FactorInteger[n]}, PrimePi[fi][[-1, 1]] - Length[fi]]; Array[a, 100] (* Jean-François Alcover, Jan 08 2016 *)
|
|
PROG
|
(PARI) a(n) = if (n==1, 0, my(pf=factor(n)[, 1]); primepi(vecmax(pf)) - #pf); \\ Michel Marcus, May 05 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|