OFFSET
1,2
COMMENTS
For most terms k of this sequence A003961(k) is also included as a term. Exceptions are: 50, 52, 66, 186, 435, 1245, 1445, 2068, 2085, 11605, ... that seems to be a subsequence of all those terms that have more than two prime factors: 50, 52, 66, 186, 435, 1245, 1445, 2068, 2085, 8695, 11605, ...
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..2001
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]]]; With[{nn = 204}, Function[s, Function[t, Select[Range@ nn, f@ # == t[[#]] &]]@ MapIndexed[Lookup[s, g[First@ #2] + 1][[#1]] - Boole[First@ #2 == 1] &, #] &@ Map[Position[Lookup[s, g@ #], #][[1, 1]] &, Range@ nn]]@ PositionIndex@ Array[g, 10^4]] (* Michael De Vlieger, Mar 08 2017, Version 10 *)
PROG
(Scheme, with Antti Karttunen's IntSeq-library)
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 08 2017
STATUS
approved