A365108 a(n) is the smallest integer value of (p^n - q^n)/n for all choices of integers p > q >= 0.
1, 2, 9, 4, 625, 672, 117649, 32, 2187, 5941760, 25937424601, 1397760, 23298085122481, 308548739072, 29192926025390625, 4096, 48661191875666868481, 3817734144, 104127350297911241532841, 174339220, 209430786243, 24639156314201655345152, 907846434775996175406740561329
Offset: 1
Keywords
Examples
For n = 5, a(5) = 672 with p = 4 and q = 2.
Links
- Felix Huber, Table of n, a(n) for n = 1..388
Programs
-
Maple
A365108 := proc(n) local q, p, s, a_n; a_n := n^(n - 1); for p to n do for q from 0 to p - 1 do s := (p^n - q^n)/n; if s = floor(s) and s < a_n then a_n := s; end if; end do; end do; return a_n; end proc; seq(A365108(n), n = 1 .. 23);
-
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
Formula
a(n) is the integer minimum of (p^n - q^n)/n for 1 <= p <= n and 0 <= q <= p - 1.
Comments