OFFSET
1,3
COMMENTS
Questions: Are all terms nonnegative? Where do ones occur?
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..13098
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, First@ #2 - 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