OFFSET
1,2
COMMENTS
(p^n - q^n)/n has the integer value n^(n - 1) for p = n and q = 0. For p = n + k + 1 (k: nonnegative integer) the term has its minimum for q = n + k. With the binomial theorem follows ((n + k + 1)^n - (n + k)^n)/n >= ((n + k)^n - n*(n + k)^(n - 1) - (n + k)^n)/n = (n + k)^(n - 1) >= n^(n - 1). Therefore, for p > n, there is no smaller value of (p^n - q^n)/n than n^(n - 1). Thus a(n) <= n^(n - 1) exists with 1 <= p <= n and 0 <= q <= p - 1.
a(n) is also the smallest integer value that the integral over f(x) = x^(n - 1) between the nonnegative integer integration limits q and p (p > q) can have.
LINKS
Felix Huber, Table of n, a(n) for n = 1..388
FORMULA
a(n) is the integer minimum of (p^n - q^n)/n for 1 <= p <= n and 0 <= q <= p - 1.
EXAMPLE
For n = 5, a(5) = 672 with p = 4 and q = 2.
MAPLE
PROG
(Python)
from sympy.ntheory.residue_ntheory import nthroot_mod
def A365108(n):
c, qdict = n**(n-1), {}
for p in range(1, n+1):
r, m = pow(p, n, n), p**n
if r not in qdict:
qdict[r] = tuple(nthroot_mod(r, n, n, all_roots=True))
c = min(c, min(((m-q**n)//n for q in qdict[r] if q<p), default=c))
return int(c) # Chai Wah Wu, Sep 23 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Felix Huber, Aug 21 2023
STATUS
approved