cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A328828 Index of the least significant digit larger than one in the primorial base expansion of n, 0 if no such digit exists.

This page as a plain text file.
%I A328828 #14 Feb 23 2025 09:27:10
%S A328828 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,
%T A328828 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,
%U A328828 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
%N A328828 Index of the least significant digit larger than one in the primorial base expansion of n, 0 if no such digit exists.
%H A328828 Antti Karttunen, <a href="/A328828/b328828.txt">Table of n, a(n) for n = 0..65537</a>
%H A328828 <a href="/index/Pri#primorialbase">Index entries for sequences related to primorial base</a>.
%F A328828 a(n) = A277885(A276086(n)) = A055396(A328572(n)).
%F A328828 a(n) = A000720(A381032(n)). - _Antti Karttunen_, Feb 23 2025
%t A328828 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 *)
%o A328828 (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); };
%Y A328828 Cf. A000720, A049345, A055396, A276086, A276156 (positions of 0's), A277885, A328572, A328829 [= a(A276086(n))], A328832, A381032 [= A008578(1+a(n))].
%K A328828 nonn,base
%O A328828 0,5
%A A328828 _Antti Karttunen_, Oct 29 2019