OFFSET
1,2
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..13330
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[ GCD[ Lookup[s, g[First@ #2] + 1][[#1]] - Boole[First@ #2 == 1], f@ First@ #2] &, #] &@ Map[Position[Lookup[s, g@ #], #][[1, 1]] &, Range@ 120]]@ PositionIndex@ Array[g, 10^4] (* Michael De Vlieger, Mar 08 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 08 2017
STATUS
approved