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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A051853 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 leftmost a varying fastest. 3
1, 1, 5, 1, 11, 7, 17, 13, 23, 19, 29, 1, 71, 127, 197, 43, 113, 169, 29, 121, 191, 37, 107, 163, 23, 79, 149, 31, 101, 157, 17, 73, 143, 199, 59, 151, 11, 67, 137, 193, 53, 109, 179, 61, 131, 187, 47, 103, 173, 19, 89, 181, 41, 97, 167, 13, 83, 139, 209, 1, 1541 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

LINKS

Table of n, a(n) for n=1..61.

FORMULA

a(n) = prim_chrem_left(n) (see Maple code)

EXAMPLE

Rows have lengths 1,2,8,48,480,5760,92160,... (A005867(n)) and terms 1; 1,5; 1,11,7,17,13,23,19,29; 1,71,127,197,43,113,169,29,121,191,37,107,163,23,79,149,31,101,157,17,73,143,199,59,151,11,67,137,193,53,109,179,61,131,187,47,103,173,19,89,181,41,97,167,13,83,139,209;

MAPLE

with(numtheory); incr_plist_from_left := proc(aa) local i, n, a; a := aa; n := nops(a); for i from 1 to n 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_left_n_times := proc(aa, n) local a, i; a := aa; for i from 1 to n do a := incr_plist_from_left(a); od; RETURN(a); end; form_modlist := proc(a) local b, i; b := []; for i from 1 to nops(a) do b := [op(b), ithprime(i)]; od; RETURN(b); end;

prim_chrem_left := proc(n) local r, m; r := incr_plist_from_left_n_times([], n); m := form_modlist(r); RETURN(chrem(r, m)); end;

MATHEMATICA

row[n_] := Module[{i}, pp = Prime[Range[n]]; iter = Sequence @@ Table[{i[k], 1, pp[[k]] - 1}, {k, n, 1, -1}]; 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. A051854.

Sequence in context: A323359 A324036 A075677 * A159074 A147414 A117637

Adjacent sequences:  A051850 A051851 A051852 * A051854 A051855 A051856

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 29 08:12 EST 2020. Contains 331337 sequences. (Running on oeis4.)