login
A343997
a(n) = A011772(n) if that number is even, otherwise A011772(n)+1.
5
2, 4, 2, 8, 4, 4, 6, 16, 8, 4, 10, 8, 12, 8, 6, 32, 16, 8, 18, 16, 6, 12, 22, 16, 24, 12, 26, 8, 28, 16, 30, 64, 12, 16, 14, 8, 36, 20, 12, 16, 40, 20, 42, 32, 10, 24, 46, 32, 48, 24, 18, 40, 52, 28, 10, 48, 18, 28, 58, 16, 60, 32, 28, 128, 26, 12, 66, 16, 24, 20, 70, 64, 72, 36, 24, 56, 22, 12, 78, 64, 80
OFFSET
1,1
LINKS
PROG
(Python)
from sympy.ntheory.modular import crt
from sympy import factorint
from itertools import product
def A343997(n):
fs = factorint(2*n)
plist = [p**fs[p] for p in fs]
x = min(k for k in (crt(plist, d)[0] for d in product([0, -1], repeat=len(plist))) if k > 0)
return x + x % 2 # Chai Wah Wu, Jun 01 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jun 01 2021
STATUS
approved