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 A353691 #16 May 07 2022 09:40:51 %S A353691 6,120,28,234,30,270,42,29792,252,1120,66,234,78,840,140,200,102,2016, %T A353691 114,1170,945,1320,138,1080,150,1560,756,270,174,3360,186,1272960,308, %U A353691 2040,210,9720,222,2280,364,148960,246,1890,258,2574,1260,2760,282,600,294 %N A353691 a(n) is the least number k > n such that h(k)/h(n) is an integer, where h(n) is the harmonic mean of the divisors of n, or -1 if no such k exists. %C A353691 Does a(n) exist for all n? If m is a harmonic number (A001599) and gcd(n, m) = 1, then a(n) exists and a(n) <= m*n, since h(m*n) = h(m)*h(n) and h(m) is an integer. %H A353691 Amiram Eldar, <a href="/A353691/b353691.txt">Table of n, a(n) for n = 1..639</a> %F A353691 a(p) = 6*p for a prime p > 3. %e A353691 a(2) = 120 since 120 is the least number > 2 such that h(120)/h(2) = (16/3)/(4/3) = 4 is an integer. %t A353691 h[n_] := DivisorSigma[0, n]/DivisorSigma[-1, n]; a[n_] := Module[{k = n + 1, hn = h[n]}, While[!IntegerQ[h[k]/hn], k++]; k]; Array[a, 30] %o A353691 (Python) %o A353691 from math import prod, gcd %o A353691 from sympy import factorint %o A353691 def A353691_helper(n): %o A353691 f = factorint(n).items() %o A353691 return prod(p**e*(p-1)*(e+1) for p, e in f), prod(p**(e+1)-1 for p, e in f) %o A353691 def A353691(n): %o A353691 Hnp, Hnq = A353691_helper(n) %o A353691 g = gcd(Hnp, Hnq) %o A353691 Hnp //= g %o A353691 Hnq //= g %o A353691 k = n+1 %o A353691 Hkp, Hkq = A353691_helper(k) %o A353691 while (Hkp*Hnq) % (Hkq*Hnp): %o A353691 k += 1 %o A353691 Hkp, Hkq = A353691_helper(k) %o A353691 return k # _Chai Wah Wu_, May 07 2022 %Y A353691 Cf. A001599, A099377, A099378. %Y A353691 Similar sequences: A069789, A069797, A069805, A353692. %K A353691 nonn %O A353691 1,1 %A A353691 _Amiram Eldar_, May 04 2022