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.

A353512 n multiplied by the least nonzero digit missing from its primorial base representation.

Original entry on oeis.org

0, 2, 4, 6, 4, 15, 12, 14, 16, 18, 30, 33, 12, 39, 42, 45, 16, 51, 18, 38, 40, 42, 22, 92, 24, 50, 52, 54, 28, 87, 60, 62, 64, 66, 102, 105, 72, 74, 76, 78, 120, 123, 126, 129, 132, 135, 138, 141, 96, 98, 100, 102, 208, 212, 108, 110, 112, 114, 174, 177, 60, 183, 186, 189, 64, 195, 198, 201, 204, 207, 210, 213, 72
Offset: 0

Views

Author

Antti Karttunen, Apr 27 2022

Keywords

Examples

			19 in primorial base (A049345) is written as "301". The least missing nonzero digit is 2, thus A329028(19) = 2 and a(19) = 2*19 = 38.
		

Crossrefs

Cf. A049345, A328840 (the fixed points, positions where a(n) = n), A329028.
Cf. also A257080 for analogous sequence.

Programs

  • Mathematica
    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]]; n * Min[Complement[Range[Max[s]+1], s]]]; a[0] = 0; Array[a, 100, 0] (* Amiram Eldar, Mar 13 2024 *)
  • PARI
    A329028(n) = { my(m=Map(), p=2); while(n, mapput(m,(n%p),1); n = n\p; p = nextprime(1+p)); for(k=1,oo,if(!mapisdefined(m,k),return(k))); };
    A353512(n) = (n * A329028(n));

Formula

a(n) = n * A329028(n).