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.

Showing 1-1 of 1 results.

A343404 For any number n with representation (d_w, ..., d_1) in primorial base, a(n) is the least number m such that m mod prime(k) = d_k for k = 1..w (where prime(k) denotes the k-th prime number).

Original entry on oeis.org

0, 1, 4, 1, 2, 5, 6, 21, 16, 1, 26, 11, 12, 27, 22, 7, 2, 17, 18, 3, 28, 13, 8, 23, 24, 9, 4, 19, 14, 29, 120, 15, 190, 85, 50, 155, 36, 141, 106, 1, 176, 71, 162, 57, 22, 127, 92, 197, 78, 183, 148, 43, 8, 113, 204, 99, 64, 169, 134, 29, 30, 135, 100, 205
Offset: 0

Views

Author

Rémy Sigrist, Apr 14 2021

Keywords

Comments

Leading zeros in primorial base expansions are ignored.
The Chinese remainder theorem ensures that this sequence is well defined and provides a way to compute it.

Examples

			For n = 42 :
- the expansion of 42 in primary base is "1200",
- so a(42) mod 2 = 0 => a(42) = 2*t for some t >= 0,
     a(42) mod 3 = 0 => a(42) = 6*u for some u >= 0,
     a(42) mod 5 = 2 => a(42) = 12 + 30*v for some v >= 0,
     a(42) mod 7 = 1 => a(42) = 162 + 210*w for some w >= 0,
- we choose w=0 so as to minimize the value,
- hence a(42) = 162.
		

Crossrefs

Cf. A002110, A079276, A143293, A235168, A343405 (fixed points).

Programs

  • PARI
    a(n) = { my (v=Mod(0,1)); forprime (p=2, oo, if (n==0, return (lift(v)), v=chinese(v, Mod(n, p)); n\=p)) }

Formula

a(n) = 1 iff n belongs to A143293.
a(n) = n iff n belongs to A343405.
a(n) < A002110(k) for any n < A002110(k) and k >= 0.
a(A002110(k)) = A079276(k+1) * A002110(k) for any k >= 0.
Showing 1-1 of 1 results.