Thank you. On 23 September 2011 10:38, D. S. McNeil <dsm...@gmail.com> wrote:
> On Fri, Sep 23, 2011 at 12:39 AM, Santanu Sarkar > <sarkar.santanu....@gmail.com> wrote: > > I want to find integer such that > > x= 1 mod 3 > > x=2 mod 5 > > x=3 mod 7 > > like this system of congruences using Chinese Remainder Theorem. > > In Sage, crt() function takes only 4 argument. > > sage: help(CRT) > > crt(a, b, m=None, n=None) > Returns a solution to a Chinese Remainder Theorem problem. > > INPUT: > > - ``a``, ``b`` - two residues (elements of some ring for which > extended gcd is available), or two lists, one of residues and > one of moduli. > [...] > > If ``a`` and ``b`` are lists, returns a simultaneous solution to > the congruences `x\equiv a_i\pmod{b_i}`, if one exists. > > .. SEEALSO:: > > - :func:`CRT_list` > > > sage: CRT([1,2,3],[3,5,7]) > 52 > sage: x = CRT([1,2,3],[3,5,7]) > sage: x % 3, x % 5, x % 7 > (1, 2, 3) > > > Doug > > -- > To post to this group, send email to sage-support@googlegroups.com > To unsubscribe from this group, send email to > sage-support+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/sage-support > URL: http://www.sagemath.org > -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org