OFFSET
0,6
LINKS
MATHEMATICA
a[n_] := Module[{k = n, p = 2, s = {}, r}, While[{k, r} = QuotientRemainder[k, p]; k != 0 || r != 0, If[r > 0, AppendTo[s, r]]; p = NextPrime[p]]; i = Position[s, _?(# > 0 &)] // Flatten; If[Length[s] < 2, 0, s[[2]]]]; Array[a, 100, 0] (* Amiram Eldar, Mar 13 2024 *)
PROG
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Apr 01 2022
STATUS
approved