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.
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!)
A157752 Smallest positive integer m such that m == prime(i) (mod prime(i+1)) for all 1<=i<=n. 4
2, 8, 68, 1118, 2273, 197468, 1728998, 1728998, 447914738, 10152454583, 1313795640428, 97783391392958, 5726413266646343, 38433316595821418, 15103232990013860963, 943894249589930135768, 52858423703753671390658, 932521283899305953765183, 8790842834979573009644273 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Suggested by Chinese Remainder Theorem.
a(n) is prime for n = 1, 5, 10, 23, 30.
LINKS
MAPLE
A157752 := proc(n)
local lrem, leval, i ;
lrem := [] ;
leval := [] ;
for i from 1 to n do
lrem := [op(lrem), ithprime(i+1)] ;
leval := [op(leval), ithprime(i)] ;
end do:
chrem(leval, lrem) ;
end proc: # R. J. Mathar, Apr 14 2016
MATHEMATICA
a[n_] := ChineseRemainder[Prime[Range[n]], Prime[Range[2, n + 1]]] a[ # ] & /@ Range[30]
Table[With[{pr=Prime[Range[n]]}, ChineseRemainder[Most[pr], Rest[pr]]], {n, 2, 30}] (* Harvey P. Dale, Jun 11 2017 *)
PROG
(PARI) x=Mod(1, 1); for(i=1, 20, x=chinese(x, Mod(prime(i), prime(i+1))); print1(component(x, 2), ", "))
(Python)
from sympy.ntheory.modular import crt
from sympy import prime
def A157752(n): return int(crt((s:=[prime(i+1) for i in range(1, n)])+[prime(n+1)], [2]+s)[0]) # Chai Wah Wu, May 02 2023
CROSSREFS
Sequence in context: A262479 A372315 A192550 * A055547 A113087 A322495
KEYWORD
nonn
AUTHOR
Zak Seidov, Mar 05 2009
EXTENSIONS
Edited by Charles R Greathouse IV, Oct 28 2009
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 May 23 18:59 EDT 2024. Contains 372765 sequences. (Running on oeis4.)