The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A329027 The least missing digit in the primorial base expansion of n. Only significant digits are considered, as the leading zeros are ignored. 4

%I #13 Mar 13 2024 01:50:57

%S 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 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 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 The least missing digit in the primorial base expansion of n. Only significant digits are considered, as the leading zeros are ignored.

%C For n = 0 the value is ambiguous, thus the sequence starts from n=1.

%H Antti Karttunen, <a href="/A329027/b329027.txt">Table of n, a(n) for n = 1..32768</a>

%H <a href="/index/Pri#primorialbase">Index entries for sequences related to primorial base</a>.

%e 19 in primorial base (A049345) is written as "301". The least missing digit is 2, thus a(19) = 2.

%t 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 (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 Cf. A049345, A329028.

%Y 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 nonn,base

%O 1,2

%A _Antti Karttunen_, Nov 03 2019

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 23 14:50 EDT 2024. Contains 372763 sequences. (Running on oeis4.)