OFFSET
1,1
COMMENTS
These partial sums, like the harmonic sequence (A004080), can never be integers.
FORMULA
Limit_{n->oo} a(n+1)/a(n) = e.
EXAMPLE
a(1) = 1 because 1/4 + 1/6 + 1/8 + 1/9 + 1/10 + 1/12 + 1/14 + 1/15 = 0.97420... < 1 but 1/4 + 1/6 + 1/8 + 1/9 + 1/10 + 1/12 + 1/14 + 1/15 + 1/16 = 1.03670... > 1.
MATHEMATICA
NextComposite[n_] := Block[{k = n + 1}, While[ PrimeQ[k], k++ ]; k]; k = 4; s = 0; Do[ While[s = s + 1/k; s < n, k = NextComposite[k]]; Print[k]; k = NextComposite[k], {n, 1, 17}]
PROG
(PARI) lista(cmax) = {my(n = 1, s = 0); forcomposite(c = 1, cmax, s += 1/c; if(s > n, print1(c, ", "); n++)); } \\ Amiram Eldar, Jul 17 2024
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Jack Brennen, Nov 12 2002
EXTENSIONS
Edited and extended by Robert G. Wilson v, Nov 14 2002
Name edited and a(18) added by Jon E. Schoenfield, Feb 01 2020
a(19)-a(20) from Amiram Eldar, Jul 17 2024
STATUS
approved