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.
6, 120, 28, 234, 30, 270, 42, 29792, 252, 1120, 66, 234, 78, 840, 140, 200, 102, 2016, 114, 1170, 945, 1320, 138, 1080, 150, 1560, 756, 270, 174, 3360, 186, 1272960, 308, 2040, 210, 9720, 222, 2280, 364, 148960, 246, 1890, 258, 2574, 1260, 2760, 282, 600, 294
Offset: 1
Keywords
Examples
a(2) = 120 since 120 is the least number > 2 such that h(120)/h(2) = (16/3)/(4/3) = 4 is an integer.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..639
Programs
-
Mathematica
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]
-
Python
from math import prod, gcd from sympy import factorint def A353691_helper(n): f = factorint(n).items() return prod(p**e*(p-1)*(e+1) for p, e in f), prod(p**(e+1)-1 for p, e in f) def A353691(n): Hnp, Hnq = A353691_helper(n) g = gcd(Hnp, Hnq) Hnp //= g Hnq //= g k = n+1 Hkp, Hkq = A353691_helper(k) while (Hkp*Hnq) % (Hkq*Hnp): k += 1 Hkp, Hkq = A353691_helper(k) return k # Chai Wah Wu, May 07 2022
Formula
a(p) = 6*p for a prime p > 3.
Comments