OFFSET
0,2
COMMENTS
Also, integer for which E(s) = s^n - Sum_{0 < k < s} k^n is maximal. It appears that a(n) + 2 is the least integer for which E(s) < 0. - M. F. Hasler, May 08 2020
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..20000
FORMULA
a(n) = ceiling(1/(2^(1/n)-1)) for n > 1. (For n = 1 resp. 0 this gives the integer 1 resp. infinity as argument of ceiling.) [Edited by M. F. Hasler, May 08 2020]
For most n, a(n) is the nearest integer to n/log(2), but there are exceptions, including n=777451915729368.
Following formulae merged in from former A230748, M. F. Hasler, May 14 2020:
a(n) = floor(1/(1-1/2^(1/n))).
a(n) = n/log(2) + O(1). - Charles R Greathouse IV, Oct 31 2013
a(n) = floor(1/(1-x)) with x^n = 1/2: f(n) = 1/(2^(1/n)-1) is never an integer for n > 1, whence floor(f(n)+1) = ceiling(f(n)) = a(n). - M. F. Hasler, Nov 02 2013, and Gabriel Conant, May 01 2016
EXAMPLE
a(2) = 3 as 2^2 = 4, 3^2 = 9 and 4^2 = 16.
For n = 777451915729368, a(n) = 1121626023352384 = ceiling(n log 2), where n*log(2) = 1121626023352383.5 - 2.13*10^-17 and 2*floor(n log 2)^n / floor(1 + n log 2)^n = 1 - 3.2*10^-32. - M. F. Hasler, Nov 02 2013
a(2) is given by floor(1/(1-1/sqrt(2))). [From former A230748.]
MATHEMATICA
Table[SelectFirst[Range@ 120, 2 #^n > (# + 1)^n &], {n, 0, 71}] (* Michael De Vlieger, May 01 2016, Version 10 *)
PROG
(PARI) for (n=2, 50, x=2; while (2*x^n<=((x+1)^n), x++); print1(x", "))
(PARI) a(n)=1\(1-1/2^(1/n)) \\ Charles R Greathouse IV, Oct 31 2013
(PARI) apply( A078607(n)=ceil(1/if(n>1, sqrtn(2, n)-1, !n+n/2)), [0..80]) \\ M. F. Hasler, May 08 2020
CROSSREFS
Cf. A224996 (the largest integer x that satisfies 2*x^n <= (x+1)^n).
KEYWORD
nonn
AUTHOR
Jon Perry, Dec 09 2002
EXTENSIONS
Edited by Dean Hickerson, Dec 17 2002
Initial terms a(0) = 1 and a(1) = 2 added by M. F. Hasler, Nov 02 2013
STATUS
approved