cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A332097 Maximum of s^n - Sum_{0 < x < s} x^n.

This page as a plain text file.
%I A332097 #20 Dec 20 2024 02:08:38
%S A332097 1,1,4,28,317,4606,84477,1919575,47891482,1512466345,48627032377,
%T A332097 1930020260416,77986967769593,3624337209819538,178110510699972510,
%U A332097 9381158756438306167,548676565488760277878,31900481466759651567625,2189463436999785648552851,144075114432622269076465962
%N A332097 Maximum of s^n - Sum_{0 < x < s} x^n.
%C A332097 For small values of s, we have Sum_{0 < x < s} x^n ~ (s-1)^n, but for s > n/log(2) + 1.5 (cf. A332101) the difference E(s) = s^n - Sum_{0 < x < s} x^n becomes negative. Just before, the difference has its maximum: We have E(s) < E(s+1) <=> 2*s^n < (s+1)^n <=> s < 1/(2^(1/n)-1), so E takes its maximum at s = A078607(n), the least integer larger than this limiting value. This appears to be almost always equal to A332101(n) - 2.
%H A332097 Alois P. Heinz, <a href="/A332097/b332097.txt">Table of n, a(n) for n = 0..367</a>
%F A332097 a(n) = s^n - Sum_{0 < x < s} x^n for s = ceiling(1/(2^(1/n)-1)) = A078607(n).
%p A332097 a:= proc(n) option remember; `if`(n=0, 1, (s->
%p A332097       s^n-add(x^n, x=1..s-1))(ceil(1/(2^(1/n)-1))))
%p A332097     end:
%p A332097 seq(a(n), n=0..20);  # _Alois P. Heinz_, May 09 2020
%t A332097 a[0] = 1; a[n_] := (s = Ceiling[1/(2^(1/n) - 1)])^n - Sum[k^n, {k, 1, s - 1}]; Array[a, 20, 0] (* _Amiram Eldar_, May 09 2020 *)
%o A332097 (PARI) {apply( A332097(n,s=1\(sqrtn(2,n-!n)-1))=(s+1)^n-sum(k=1,s,k^n), [0..20])}
%Y A332097 Cf. A030052 (least k such that k^n = sum of distinct n-th powers).
%Y A332097 Cf. A078607 (s for which E(s) = a(n) <=> least k such that 2*k^n > (k+1)^n).
%Y A332097 Cf. A332065 (all k such that k^n is a sum of distinct n-th powers).
%Y A332097 Cf. A332101 (least k such that k^n <= sum of all smaller n-th powers).
%K A332097 nonn
%O A332097 0,3
%A A332097 _M. F. Hasler_, May 07 2020