|
|
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.
|
|
2
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
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.
|
|
LINKS
|
|
|
FORMULA
|
a(p) = 6*p for a prime p > 3.
|
|
EXAMPLE
|
a(2) = 120 since 120 is the least number > 2 such that h(120)/h(2) = (16/3)/(4/3) = 4 is an integer.
|
|
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]
|
|
PROG
|
(Python)
from math import prod, gcd
from sympy import factorint
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)
g = gcd(Hnp, Hnq)
Hnp //= g
Hnq //= g
k = n+1
while (Hkp*Hnq) % (Hkq*Hnp):
k += 1
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|