OFFSET
1,3
COMMENTS
a(n) = floor(Sum_{i=1..n} (1/i)^(1/i)) = floor(Sum_{i=1..n} i^(-1/i)).
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = n - log(n)^2/2 + O(1) as n -> infinity. - Robert Israel, Jan 05 2016
EXAMPLE
For a(5), 1^1 + (1/2)^(1/2) + (1/3)^(1/3) + (1/4)^(1/4) + (1/5)^(1/5) ~= 3.8323545. Therefore a(5) = 3.
MAPLE
A066508:=n->floor(add((1/i)^(1/i), i=1..n)): seq(A066508(n), n=1..100); # Wesley Ivan Hurt, Jan 03 2016
MATHEMATICA
Table[ Floor[ Sum[ (1/i)^(1/i), {i, n} ]], {n, 75} ]
Floor[Accumulate[With[{nn=75}, (1/Range[nn])^(1/Range[nn])]]] (* Harvey P. Dale, Oct 05 2022 *)
PROG
(PARI) { s=0; for (n=1, 1000, s+=(1/n)^(1/n); write("b066508.txt", n, " ", floor(s)) ) } \\ Harry J. Smith, Feb 19 2010
(PARI) a(n) = floor(sum(i=1, n, (1/i)^(1/i))); \\ Michel Marcus, Jan 04 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Robert G. Wilson v, Jan 04 2002
EXTENSIONS
Example corrected by Harry J. Smith, Feb 19 2010
STATUS
approved