[go: up one dir, main page]

login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
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
CROSSREFS
Similar sequences: A069789, A069797, A069805, A353692.
Sequence in context: A054957 A373239 A271648 * A290341 A246827 A127726
KEYWORD
nonn
AUTHOR
Amiram Eldar, May 04 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 30 09:19 EDT 2024. Contains 375532 sequences. (Running on oeis4.)