OFFSET
1
LINKS
FORMULA
PROG
(Python)
from sympy.ntheory.modular import crt
from sympy import factorint
from itertools import product
def A343999(n):
fs = factorint(2*n)
plist = [p**fs[p] for p in fs]
return int(min(k for k in (crt(plist, d)[0] for d in product([0, -1], repeat=len(plist))) if k > 0) % 2) # Chai Wah Wu, Jun 01 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jun 01 2021
STATUS
approved