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.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jun 01 2021

Keywords

Crossrefs

Programs

  • 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