A079067 Number of primes less than greatest prime factor of n but not dividing n.
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
Offset: 1
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..20000 (first 1000 terms from G. C. Greubel)
Crossrefs
Programs
-
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)): seq(a(n), n=1..100); # Alois P. Heinz, Sep 03 2019
-
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 *)
-
PARI
a(n) = if (n==1, 0, my(pf=factor(n)[,1]); primepi(vecmax(pf)) - #pf); \\ Michel Marcus, May 05 2017
Comments