OFFSET
1,4
COMMENTS
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..1000
EXAMPLE
A004394(8) = 48 = 2^4*3, which has 2 distinct prime factors, so a(8)=2.
MATHEMATICA
(* First, convert terms in b-file at A004394 into a list of terms: *)
f[w_] := Times @@ Flatten@ {Complement[#1, Union[#2, #3]], Product[Prime@ i, {i, PrimePi@ #}] & /@ #2, Factorial /@ #3} & @@ ToExpression@ {StringSplit[w, _?(! DigitQ@ # &)], StringCases[w, (x : DigitCharacter ..) ~~ "#" :> x], StringCases[w, (x : DigitCharacter ..) ~~ "!" :> x]};
s = Map[Which[StringTake[#, 1] == {"#"}, f@ Last@ StringSplit@ Last@ #, StringTake[#, 1] == {}, Nothing, True, ToExpression@ StringSplit[#][[1, -1]]] &, Drop[Import["b004394.txt", "Data"], 3] ];
PrimeNu[Take[s, 105]]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michael De Vlieger, Jun 30 2018
STATUS
approved