This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A343997 #10 Jun 01 2021 15:36:52 %S A343997 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, %T A343997 28,16,30,64,12,16,14,8,36,20,12,16,40,20,42,32,10,24,46,32,48,24,18, %U A343997 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 %N A343997 a(n) = A011772(n) if that number is even, otherwise A011772(n)+1. %H A343997 N. J. A. Sloane, <a href="/A343997/b343997.txt">Table of n, a(n) for n = 1..16383</a> %o A343997 (Python) %o A343997 from sympy.ntheory.modular import crt %o A343997 from sympy import factorint %o A343997 from itertools import product %o A343997 def A343997(n): %o A343997 fs = factorint(2*n) %o A343997 plist = [p**fs[p] for p in fs] %o A343997 x = min(k for k in (crt(plist,d)[0] for d in product([0,-1],repeat=len(plist))) if k > 0) %o A343997 return x + x % 2 # _Chai Wah Wu_, Jun 01 2021 %Y A343997 Cf. A000217, A011772, A061781, A343996. %K A343997 nonn %O A343997 1,1 %A A343997 _N. J. A. Sloane_, Jun 01 2021