login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
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: A233091 A286941 A332459 * A006569 A224139 A320905
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 13:59 EDT 2024. Contains 371734 sequences. (Running on oeis4.)