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.

A351913 Least k such that A352483(k) = n, or -1 if no such k exists.

Original entry on oeis.org

3, 9, 5, 204, 7, 876, 20, 140, 11, 492, 13, 776, 32, 904, 17, 441, 19, 23364, 44, 2178, 23, 25, 27, 1544, 216, 3756, 29, 460, 31, 1928, 35, 2056, 280, 1644, 37, 5196, 117, 162, 41, 1089, 43, 2696, 92, 2824, 47, 49, 51, 6924, 153, 812, 53, 7524, 57, 3464, 116, 1521, 59, 940, 61
Offset: 1

Views

Author

Michel Marcus, Mar 18 2022

Keywords

Comments

What is the value of a(102)?
Conjecture: a(102) and all "Unknown" values in the a-file equal -1. - Paolo Xausa, Aug 16 2022

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = 3}, While[Denominator[k*(d = DivisorSigma[0, k])/(k - d)] != n, k++]; k]; Array[a, 60] (* Amiram Eldar, Mar 18 2022 *)
  • PARI
    f(n) = my(d=numdiv(n)); denominator(n*d/(n-d)); \\ A352483
    a(n) = {my(k=3); while (f(k) != n, k++); k;}
    
  • Python
    from math import gcd
    from sympy import divisor_count
    from itertools import count, islice
    def f(n): d = divisor_count(n); g = gcd(n-d, n*d); return (n-d)//g
    def agen():
        n, adict = 1, dict()
        for k in count(1):
            fk = f(k)
            if fk not in adict: adict[fk] = k
            while n in adict: yield adict[n]; n += 1
    print(list(islice(agen(), 60))) # Michael S. Branicky, Jul 23 2022

Formula

a(n) = n+2 iff n > 0 is a term of A040976. - Bernard Schott, Mar 24 2022