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