The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A053664 Smallest number m such that m == i (mod prime(i)) for all 1<=i<=n. 14
 1, 5, 23, 53, 1523, 29243, 299513, 4383593, 188677703, 5765999453, 5765999453, 2211931390883, 165468170356703, 8075975022064163, 361310530977154973, 20037783573808880093, 1779852341342071295513, 40235059344426324076913 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS Suggested by Chinese Remainder Theorem. REFERENCES Niven and Zuckerman, An Introduction to the Theory of Numbers, John Wiley, 1966, p. 40 Paulo Ribenboim, The New Book of Prime Numbers Records, Springer 1996, p. 33 LINKS Nick Hobson and Robert G. Wilson v, Table of n, a(n) for n = 1..350 (first 100 terms from Nick Hobson) Project Euler, Problem 552: Chinese leftovers II EXAMPLE a(3) = 23 because this is the smallest number m such that m == 1 (mod 2), m == 2 (mod 3) and m == 3 (mod 5). a(4) = 53 because 53 - 1 is divisible by 2, 53 - 2 is divisible by 3, 53 - 3 is divisible by 5 and 53 - 4 is divisible by 7. MATHEMATICA f[n_] := ChineseRemainder[ Range[n], Prime[Range[n]]]; Array[f, 20] PROG (PARI) for(n=1, 20, m=1; while(sum(i=1, n, abs(m%prime(i)-i))>0, m++); print1(m, ", ")) (PARI) x=Mod(1, 1); for(i=1, 18, x=chinese(x, Mod(i, prime(i))); print1(component(x, 2), ", ")) /* Nick Hobson (nickh(AT)qbyte.org), Jan 08 2007 */ (Python) from sympy.ntheory.modular import crt from sympy import prime def A053664(n): return int(crt([prime(i) for i in range(1, n+1)], list(range(1, n+1)))[0]) # Chai Wah Wu, May 01 2023 CROSSREFS Cf. A192363. Sequence in context: A289154 A155851 A019267 * A186030 A092544 A319087 Adjacent sequences: A053661 A053662 A053663 * A053665 A053666 A053667 KEYWORD nonn,easy,nice AUTHOR Joe K. Crump (joecr(AT)carolina.rr.com), Feb 16 2000 EXTENSIONS Additional comments from Luis A. Rodriguez (luiroto(AT)yahoo.com), Apr 23 2002 Edited by N. J. A. Sloane and Robert G. Wilson v, May 03 2002 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.

Last modified May 19 20:45 EDT 2024. Contains 372703 sequences. (Running on oeis4.)