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.

A328570 Index of the least significant zero digit in the primorial base expansion of n, when the rightmost digit is in the position 1.

Original entry on oeis.org

1, 2, 1, 3, 1, 3, 1, 2, 1, 4, 1, 4, 1, 2, 1, 4, 1, 4, 1, 2, 1, 4, 1, 4, 1, 2, 1, 4, 1, 4, 1, 2, 1, 3, 1, 3, 1, 2, 1, 5, 1, 5, 1, 2, 1, 5, 1, 5, 1, 2, 1, 5, 1, 5, 1, 2, 1, 5, 1, 5, 1, 2, 1, 3, 1, 3, 1, 2, 1, 5, 1, 5, 1, 2, 1, 5, 1, 5, 1, 2, 1, 5, 1, 5, 1, 2, 1, 5, 1, 5, 1, 2, 1, 3, 1, 3, 1, 2, 1, 5, 1, 5, 1, 2, 1, 5
Offset: 0

Views

Author

Antti Karttunen, Oct 20 2019

Keywords

Comments

Index of the least prime not dividing A276086(n), where A276086 converts the primorial base expansion of n into its prime product form.
Starting from x = n, repeatedly divide x by prime(1) (discarding the remainder), and set x to the integer quotient floor(x/prime(1)), then divide x with prime(2) (again discarding the remainder, and setting x to the integer quotient), etc., stopping as soon one of the primes is a divisor of the previous integer quotient (leaving zero remainder). a(n) is then the index of that prime, equal to 1 + the number of iterations done.

Examples

			For n = 2, we divide it with A000040(1) = 2, and it leaves zero remainder, so we have finished on the first round (needing no actual iterations), and thus a(2) = 1. Note that 2 in primorial base (A049345) is written as "10", and indeed the first zero from the right occurs at the position 1.
For n = 5, we first divide 5 with prime(1) = 2, and discarding the remainder, we are left with floor(5/2) = 2. Then we divide that 2 with prime(2) = 3, leaving floor(2/3) = 0 and remainder 2. And finally we divide 0 with prime(3) = 5, and that doesn't leave any remainder, thus we are finished on the third round, and a(5) = 3. Note that 5 in primorial base is written as "21", and allowing here a leading zero, written as "021", we see that it is in this case the least significant zero occurring at position 3 from the right.
For n = 43, we first divide it with prime(1) = 2, leaving a remainder 1 and integer quotient 21. Then we divide 21 with prime(2) = 3, which doesn't leave any remainder, thus we are finished on the second round, and a(43) = 2. Note that 43 is written as "1201" in primorial base, with the least significant zero occurring in the position 2.
		

Crossrefs

Programs

  • PARI
    A328570(n) = { my(i=1, p=2); while(n && (n%p), i++; n = n\p; p = nextprime(1+p)); (i); };

Formula

a(n) = A000720(A326810(n)) = A257993(A276086(n)) = A055396(A276087(n)).
For all n >= 0, A002110(a(n)) = A328580(n), a(A276086(n)) = A328578(n).
For all odd n, A000040(a(n)) = A326810(n) > A276088(n).
For all n >= 0, A276086(n)/A002110(a(n)-1) = A328475(n) and A276086(n)-A002110(a(n)-1) = A328476(n).