The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A051854 Table of solutions to all possible Chinese Remainder Equations x = a1 mod p1, x = a2 mod p2, ..., x = an mod pn, where p1 - pn are the first n primes and each a1 - an varies between 1 and (its respective) p-1, with the rightmost a (an) varying fastest. 1
 1, 1, 5, 1, 7, 13, 19, 11, 17, 23, 29, 1, 121, 31, 151, 61, 181, 127, 37, 157, 67, 187, 97, 43, 163, 73, 193, 103, 13, 169, 79, 199, 109, 19, 139, 71, 191, 101, 11, 131, 41, 197, 107, 17, 137, 47, 167, 113, 23, 143, 53, 173, 83, 29, 149, 59, 179, 89, 209, 1, 211, 421 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 LINKS FORMULA a(n) = prim_chrem_right(n) (see Maple code) EXAMPLE Rows have lengths 1,2,8,48,480,5760,92160,... (A005867(n)) and terms 1; 1,5; 1,7,13,19,11,17,23,29; MAPLE with(numtheory); incr_plist_from_right := proc(aa) local i, n, a; a := aa; n := nops(a); for i from n by -1 to 1 do if(a[i] < (ithprime(i)-1)) then a[i] := a[i]+1; RETURN(a); else a[i] := 1; fi; od; RETURN([op(a), 1]); end; incr_plist_from_right_n_times := proc(aa, n) local a, i; a := aa; for i from 1 to n do a := incr_plist_from_right(a); od; RETURN(a); end; prim_chrem_right := proc(n) local r, m; r := incr_plist_from_right_n_times([], n); m := form_modlist(r); RETURN(chrem(r, m)); end; # For form_modlist see A051853. MATHEMATICA row[n_] := Module[{i}, pp = Prime[Range[n]]; iter = Sequence @@ Table[{ i[k], 1, pp[[k]] - 1}, {k, 1, n}]; Table[ChineseRemainder[Array[i, n], pp], iter // Evaluate] // Flatten]; Table[row[n], {n, 1, 5}] // Flatten (* Jean-François Alcover, Mar 06 2016 *) CROSSREFS Cf. A051853. Sequence in context: A001945 A233091 A286941 * A006569 A224139 A320905 Adjacent sequences:  A051851 A051852 A051853 * A051855 A051856 A051857 KEYWORD nonn,tabf AUTHOR Antti Karttunen, Dec 13 1999 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified January 19 09:35 EST 2020. Contains 331048 sequences. (Running on oeis4.)