OFFSET
0,4
COMMENTS
The terms larger than one are given by the k-th prime (A000040), where k is the position of the second least significant nonzero digit in the primorial base expansion of n, counted from the right. See the example.
LINKS
FORMULA
EXAMPLE
MATHEMATICA
a[n_] := Module[{k = n, p = 2, s = {}, r, i}, While[{k, r} = QuotientRemainder[k, p]; k != 0 || r != 0, AppendTo[s, r]; p = NextPrime[p]]; i = Position[s, _?(# > 0 &)] // Flatten; If[Length[i] < 2, 1, Prime[i[[2]]]]]; Array[a, 100, 0] (* Amiram Eldar, Mar 13 2024 *)
PROG
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Apr 01 2022
STATUS
approved