OFFSET
1,2
COMMENTS
Conjecture: a(n+1)/a(n) converges to 1.64872...
The conjecture is correct, a(n+1)/a(n) ~ exp(1/2) (A019774). - Charles R Greathouse IV, Jun 03 2013
Conjecture: a(n) = round(exp(n/2-gamma)) for all n, where gamma is the Euler-Mascheroni constant (see A001620). - Jon E. Schoenfield, Jul 19 2015
The terms up to a(52) contained in the b-file have been obtained by working with quadruple-precision (128 bits) floating point numbers, hence there is a very small probability they are off by 1. - Giovanni Resta, Jul 21 2015
All terms in the b-file are correct. Moreover, the above conjecture that a(n) = round(exp(n/2-gamma)) has been verified for all n in 1..10000. - Jon E. Schoenfield, Jul 22 2015
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..52
EXAMPLE
a(5) = 7 because 1 + 1/2 + ... + 1/6 < 5/2 < 1 + 1/2 + ... + 1/6 + 1/7.
MATHEMATICA
nn = 24; g = 1/2; f[n_] := 1/n; a[1] = 1; Do[s = 0; a[n] = NestWhile[# + 1 &, 1, ! (s += f[#]) > n*g &], {n, nn}]; Map[a, Range[nn]]
PROG
(PARI) first(m)=my(v=vector(m), i, k); for(i=1, m, k=1; while(sum(x=1, k, 1/x)<=i/2, k++); v[i]=k; ); v; \\ Anders Hellström, Jul 19 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, May 29 2013
EXTENSIONS
a(29)-a(35) from Jean-François Alcover, Jun 04 2013
a(36)-a(37) from Jon E. Schoenfield, Aug 31 2013
a(38)-a(39) from Jon E. Schoenfield, Jul 19 2015
STATUS
approved