login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A328828
Index of the least significant digit larger than one in the primorial base expansion of n, 0 if no such digit exists.
7
0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 2, 2, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 2, 2, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 2, 2, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 2, 2, 4, 4, 4, 4, 2, 2, 4, 4, 4, 4, 2, 2, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 2, 2, 4, 4, 4, 4, 2, 2, 4, 4, 4, 4, 2, 2, 3, 3, 3, 3
OFFSET
0,5
FORMULA
a(n) = A277885(A276086(n)) = A055396(A328572(n)).
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 = FirstPosition[s, _?(# > 1 &)]; If[MissingQ[i], 0, i[[1]]]]; Array[a, 100] (* Amiram Eldar, Mar 13 2024 *)
PROG
(PARI) A328828(n) = { my(i=1, p=2); while(n, if((n%p)>1, return(i)); i++; n = n\p; p = nextprime(1+p)); (0); };
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Oct 29 2019
STATUS
approved