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.
%I A343404 #13 Apr 16 2021 01:44:39 %S A343404 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, %T A343404 19,14,29,120,15,190,85,50,155,36,141,106,1,176,71,162,57,22,127,92, %U A343404 197,78,183,148,43,8,113,204,99,64,169,134,29,30,135,100,205 %N 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). %C A343404 Leading zeros in primorial base expansions are ignored. %C A343404 The Chinese remainder theorem ensures that this sequence is well defined and provides a way to compute it. %H A343404 Rémy Sigrist, <a href="/A343404/b343404.txt">Table of n, a(n) for n = 0..10000</a> %H A343404 Wikipedia, <a href="http://en.wikipedia.org/wiki/Chinese_remainder_theorem">Chinese remainder theorem</a> %H A343404 <a href="/index/Pri#primorialbase">Index entries for sequences related to primorial base</a> %F A343404 a(n) = 1 iff n belongs to A143293. %F A343404 a(n) = n iff n belongs to A343405. %F A343404 a(n) < A002110(k) for any n < A002110(k) and k >= 0. %F A343404 a(A002110(k)) = A079276(k+1) * A002110(k) for any k >= 0. %e A343404 For n = 42 : %e A343404 - the expansion of 42 in primary base is "1200", %e A343404 - so a(42) mod 2 = 0 => a(42) = 2*t for some t >= 0, %e A343404 a(42) mod 3 = 0 => a(42) = 6*u for some u >= 0, %e A343404 a(42) mod 5 = 2 => a(42) = 12 + 30*v for some v >= 0, %e A343404 a(42) mod 7 = 1 => a(42) = 162 + 210*w for some w >= 0, %e A343404 - we choose w=0 so as to minimize the value, %e A343404 - hence a(42) = 162. %o A343404 (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)) } %Y A343404 Cf. A002110, A079276, A143293, A235168, A343405 (fixed points). %K A343404 nonn,base %O A343404 0,3 %A A343404 _Rémy Sigrist_, Apr 14 2021