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.

A350654 Smallest k such that A349949(k) = n, or -1 if no such k exists.

Original entry on oeis.org

2, 3, 8, 15, 63, 120, 440, 945, 2079, 4095, 21735, 98175, 133056, 395199, 338625, 1890945, 3501576, 8390304, 35820225, 126775935, 149848335, 879207616, 302464800
Offset: 1

Views

Author

Tejo Vrush, Jan 09 2022

Keywords

Comments

a(25) = 879207615. - Chai Wah Wu, Jan 13 2022

Crossrefs

Programs

  • PARI
    f(n) = my(sd=setunion(divisors(n-1), divisors(n+1))); sumdiv(n, d, (vecsearch(sd, d-1)>0) || (vecsearch(sd, d+1)>0)); \\ A349949
    a(n) = my(k=2); while (f(k) != n, k++); k; \\ Michel Marcus, Jan 10 2022
    
  • Python
    from itertools import count
    from sympy import divisors
    def A350654(n):
        for m in count(2):
            c = 0
            for d in divisors(m,generator=True):
                if not (((m-1) % (d-1) if d > 1 else True) and (m-1) % (d+1) and ((m+1) % (d-1) if d > 1 else True) and (m+1) % (d+1)):
                    c += 1
                    if c > n:
                        break
            if c == n:
                return m # Chai Wah Wu, Jan 12 2022

Extensions

a(11)-a(19) from Jinyuan Wang, Jan 10 2022
Escape clause value changed to -1 by N. J. A. Sloane, Jan 12 2022
a(20)-a(21) from Chai Wah Wu, Jan 12 2022
a(22)-a(23) from Chai Wah Wu, Jan 13 2022