login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A343996
a(n) = A011772(n) if that number is odd, otherwise A011772(n)+1.
4
1, 3, 3, 7, 5, 3, 7, 15, 9, 5, 11, 9, 13, 7, 5, 31, 17, 9, 19, 15, 7, 11, 23, 15, 25, 13, 27, 7, 29, 15, 31, 63, 11, 17, 15, 9, 37, 19, 13, 15, 41, 21, 43, 33, 9, 23, 47, 33, 49, 25, 17, 39, 53, 27, 11, 49, 19, 29, 59, 15, 61, 31, 27, 127, 25, 11, 67, 17, 23, 21, 71, 63, 73, 37, 25, 57, 21, 13, 79, 65, 81, 41
OFFSET
1,2
LINKS
PROG
(Python)
from sympy.ntheory.modular import crt
from sympy import factorint
from itertools import product
def A343996(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 + 1 - x % 2 # Chai Wah Wu, Jun 01 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jun 01 2021
STATUS
approved