OFFSET
1,3
COMMENTS
a(1) = 0 by convention.
FORMULA
a(prime(n)) = n.
a(p^n) = n where p is any prime number and n > 1.
a(product of n > 1 distinct primes) = n.
EXAMPLE
Starting with the normalized multiset of prime factors of 360, we obtain {1,1,1,2,2,3} -> {1,2,3} -> {1,1,1} -> {3}, so a(360) = 3.
MATHEMATICA
Table[If[n===1, 0, NestWhile[Sort[Length/@Split[#]]&, If[n===1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]], Length[#]>1&]//First], {n, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 13 2018
STATUS
approved