reviewed
approved
reviewed
approved
proposed
reviewed
editing
proposed
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
proposed
editing
editing
proposed
(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
(Python)
from sympy.ntheory.modular import crt
from sympy import prime
from sympy import primedef def A157752(n): return crt((s:=[prime(i+1) for i in range(1, n)])+[prime(n+1)], [2]+s)[0] # Chai Wah Wu, May 02 2023
(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 primedef A157752(n): return crt((s:=[prime(i+1) for i in range(1, n)])+[prime(n+1)], [2]+s)[0] # Chai Wah Wu, May 02 2023
approved
editing
reviewed
approved
proposed
reviewed
editing
proposed