A351566 Radix of the second least significant nonzero digit in the primorial base expansion of n, or 1 if there is no such digit.
1, 1, 1, 3, 1, 3, 1, 5, 5, 3, 5, 3, 1, 5, 5, 3, 5, 3, 1, 5, 5, 3, 5, 3, 1, 5, 5, 3, 5, 3, 1, 7, 7, 3, 7, 3, 7, 5, 5, 3, 5, 3, 7, 5, 5, 3, 5, 3, 7, 5, 5, 3, 5, 3, 7, 5, 5, 3, 5, 3, 1, 7, 7, 3, 7, 3, 7, 5, 5, 3, 5, 3, 7, 5, 5, 3, 5, 3, 7, 5, 5, 3, 5, 3, 7, 5, 5, 3, 5, 3, 1, 7, 7, 3, 7, 3, 7, 5, 5, 3, 5, 3, 7, 5, 5, 3
Offset: 0
Examples
For n = 13, its primorial base representation (see A049345) is "201" as 13 = 2*A002110(2) + 1*A002110(0). The one-based index of the second least significant nonzero digit ("2"), when counted from the right, is 3, therefore a(13) = A000040(3) = 5.
Links
Crossrefs
Programs
-
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 *)
-
PARI
A119288(n) = if(1>=omega(n), 1, (factor(n))[2,1]); A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); }; A351566(n) = A119288(A276086(n));
Comments