OFFSET
1,8
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..13098
FORMULA
MATHEMATICA
f[n_] := f[n] = Which[n == 1, 1, PrimeQ@ n, NextPrime@ n, True, Times @@ Replace[FactorInteger[n], {p_, e_} :> f[p]^e, 1]]; g[n_] := If[n == 1, 0, PrimePi@ FactorInteger[n][[1, 1]]]; Function[s, MapIndexed[Function[t, t/GCD[t, f@ First@ #2]][Lookup[s, g[First@ #2] + 1][[#1]] - Boole[First@ #2 == 1]] &, #] &@ Map[Position[Lookup[s, g@ #], #][[1, 1]] &, Range@ 120]]@ PositionIndex@ Array[g, 10^4] (* Michael De Vlieger, Mar 08 2017, Version 10 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 08 2017
STATUS
approved