cp's OEIS Frontend

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.

A343996 a(n) = A011772(n) if that number is odd, otherwise A011772(n)+1.

This page as a plain text file.
%I A343996 #10 Jun 01 2021 15:34:51
%S A343996 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,
%T A343996 29,15,31,63,11,17,15,9,37,19,13,15,41,21,43,33,9,23,47,33,49,25,17,
%U A343996 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
%N A343996 a(n) = A011772(n) if that number is odd, otherwise A011772(n)+1.
%H A343996 N. J. A. Sloane, <a href="/A343996/b343996.txt">Table of n, a(n) for n = 1..16383</a>
%o A343996 (Python)
%o A343996 from sympy.ntheory.modular import crt
%o A343996 from sympy import factorint
%o A343996 from itertools import product
%o A343996 def A343996(n):
%o A343996     fs = factorint(2*n)
%o A343996     plist = [p**fs[p] for p in fs]
%o A343996     x = min(k for k in (crt(plist,d)[0] for d in product([0,-1],repeat=len(plist))) if k > 0)
%o A343996     return x + 1 - x % 2 # _Chai Wah Wu_, Jun 01 2021
%Y A343996 Cf. A000217, A011772, A061781, A343997.
%K A343996 nonn
%O A343996 1,2
%A A343996 _N. J. A. Sloane_, Jun 01 2021