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.

A329027 The least missing digit in the primorial base expansion of n. Only significant digits are considered, as the leading zeros are ignored.

This page as a plain text file.
%I A329027 #13 Mar 13 2024 01:50:57
%S A329027 0,2,0,1,0,2,2,2,0,3,0,1,3,3,0,1,0,1,2,2,0,1,0,1,2,2,0,1,0,2,2,2,2,3,
%T A329027 3,2,2,2,0,3,0,3,3,3,0,3,0,2,2,2,0,4,0,2,2,2,0,3,0,1,3,3,3,1,3,3,3,3,
%U A329027 0,3,0,1,3,3,0,1,0,1,4,4,0,1,0,1,3,3,0,1,0,1,2,2,2,1,4,2,2,2,0,4,0,1,4,4,0
%N A329027 The least missing digit in the primorial base expansion of n. Only significant digits are considered, as the leading zeros are ignored.
%C A329027 For n = 0 the value is ambiguous, thus the sequence starts from n=1.
%H A329027 Antti Karttunen, <a href="/A329027/b329027.txt">Table of n, a(n) for n = 1..32768</a>
%H A329027 <a href="/index/Pri#primorialbase">Index entries for sequences related to primorial base</a>.
%e A329027 19 in primorial base (A049345) is written as "301". The least missing digit is 2, thus a(19) = 2.
%t A329027 a[n_] := Module[{k = n, p = 2, s = {}, r}, While[{k, r} = QuotientRemainder[k, p]; k != 0 || r != 0, AppendTo[s, r]; p = NextPrime[p]]; Min[Complement[Range[0, Max[s]+1], s]]]; Array[a, 100] (* _Amiram Eldar_, Mar 13 2024 *)
%o A329027 (PARI) A329027(n) = { my(m=Map(), p=2); while(n, mapput(m,(n%p),1); n = n\p; p = nextprime(1+p)); for(k=0,oo,if(!mapisdefined(m,k),return(k))); };
%Y A329027 Cf. A049345, A329028.
%Y A329027 Cf. A328574 (after its initial term, gives the positions of zeros in this sequence), A328840 (after its initial term, gives the positions of ones in this sequence).
%K A329027 nonn,base
%O A329027 1,2
%A A329027 _Antti Karttunen_, Nov 03 2019