OFFSET
1,5
LINKS
FORMULA
MATHEMATICA
Array[-1 + PrimeOmega@ # - PrimeNu@ # + PrimePi[FactorInteger[#][[-1, 1]]] /. k_ /; k < 0 -> 0 &, 105] (* or, slightly faster *)
Array[-1 + Length@ # - Length@ Union@ # + PrimePi@ Last@ # /. k_ /; k < 0 -> 0 &@ Flatten@ Map[ConstantArray[#1, #2] & @@ # &, #] &@ FactorInteger[#] &, 105] (* Michael De Vlieger, Mar 13 2018 *)
PROG
(PARI)
A061395(n) = if(1==n, 0, primepi(vecmax(factor(n)[, 1]))); \\ After M. F. Hasler's code for A006530.
\\ Or just as:
\\ Antti Karttunen, Mar 13 2018
(Python)
from sympy import factorint, primepi
def A297167(n): return primepi(max(f:=factorint(n)))+sum(e-1 for e in f.values())-1 if n>1 else 0 # Chai Wah Wu, Jul 29 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 27 2018
EXTENSIONS
Name changed, original equivalent definition is the first entry in the Formula section - Antti Karttunen, Mar 13 2018
STATUS
approved