OFFSET
2,1
COMMENTS
The sequence begins at n = 2. a(1) != -1 if and only if two consecutive harmonic numbers exist. There are no odd harmonic numbers between 2 and 10^24 (Cohen and Sorli, 2010) and it is conjectured that they do not exist.
LINKS
Graeme L. Cohen and Ronald M. Sorli, Odd harmonic numbers exceed 10^24, Mathematics of Computation, Vol. 79, No. 272 (2010), pp. 2451-2460.
EXAMPLE
MATHEMATICA
c[n_] := Length @ ContinuedFraction[DivisorSigma[0, n]/DivisorSigma[-1, n]]; seq[len_, nmax_] := Module[{s = Table[0, {len}], k = 1, n = 1, i}, s[[1]] = -1; While[n < nmax && k < len, i = c[n]; If[c[n+1] == i && i <= len && s[[i]] == 0, k++; s[[i]] = n]; n++]; Rest @ s]; seq[15, 10^6]
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Nov 20 2021
STATUS
approved