Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #9 Feb 08 2023 14:47:05
%S 0,0,1,0,3,4,1,2,5,0,15,10,25,20,5,6,21,16,1,26,11,12,27,22,7,2,17,18,
%T 3,28,13,8,23,24,9,4,19,14,29,0,105,70,175,140,35,126,21,196,91,56,
%U 161,42,147,112,7,182,77,168,63,28,133,98,203,84,189,154,49
%N Irregular table T(n, k), n >= 0, k = 0..A002110(n)-1, read by rows; for any k with primorial base expansion (d_n, ..., d_1), T(n, k) is the least number t such that t mod prime(u) = d_u for u = 1..n (where prime(u) denotes the u-th prime number).
%C When computing T(n, k), we pad the primorial base expansion of k with leading zeros so as to have n digits.
%C The Chinese remainder theorem ensures that this sequence is well defined and provides a way to compute it.
%C The n-th row is a permutation of 0..A002110(n)-1.
%H Rémy Sigrist, <a href="/A360407/b360407.txt">Table of n, a(n) for n = 0..2558</a>
%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Chinese_remainder_theorem">Chinese remainder theorem</a>
%H <a href="/index/Pri#primorialbase">Index entries for sequences related to primorial base</a>
%F T(n, 0) = 0.
%F T(n, 1) = A070826(n) for any n > 0.
%F T(n, A002110(n) - 1) = A057588(n) for any n > 0.
%F T(n, k) + T(n, A002110(n) - 1 - k) = A002110(n) - 1.
%e Table T(n, k) begins:
%e 0;
%e 0, 1;
%e 0, 3, 4, 1, 2, 5;
%e 0, 15, 10, 25, 20, 5, 6, 21, 16, 1, 26, 11, 12, 27, 22,
%e 7, 2, 17, 18, 3, 28, 13, 8, 23, 24, 9, 4, 19, 14, 29;
%e ...
%o (PARI) T(n,k) = { my (t=Mod(0,1)); if (n, forprime (p=2, prime(n), t=chinese(t, Mod(k, p)); k\=p)); lift(t) }
%Y See A343404 for a similar sequence.
%Y Cf. A002110, A057588, A070826.
%K nonn,base,tabf
%O 0,5
%A _Rémy Sigrist_, Feb 06 2023