login
Positive integers that cannot be expressed as 1^e_1 + 2^e_2 + 3^e_3 ... + k^e_k with each exponent positive.
0

%I #20 Jul 06 2023 09:48:48

%S 2,4,7,11,13,19,25,31

%N Positive integers that cannot be expressed as 1^e_1 + 2^e_2 + 3^e_3 ... + k^e_k with each exponent positive.

%C I conjecture that this list is finite.

%e 1 is not in the sequence because it's equal to 1^1.

%e 3 is not in the sequence because it's equal to 1^1 + 2^1.

%e 20 is not in the sequence because it's equal to 1^1 + 2^4 + 3^1.

%e 29 is not in the sequence because it's equal to 1^1 + 2^2 + 3^1 + 4^2 + 5^1.

%o (Python)

%o from itertools import product

%o import math

%o max_term = 250

%o seq_set = set(range(1, max_term+1))

%o # Use the quadratic formula to calculate the maximum value for k,

%o # such that 1^1 + 2^1 + 3^1 + ... + k^1 is less than max_term.

%o max_k = int((-1 + math.sqrt(1 + 8 * max_term))/2.0) + 1

%o for k in range(1, max_k+1):

%o list_of_exponent_ranges = [range(1,2)]

%o for i in range(2, k+1):

%o max_exponent = int(math.log(max_term, i))

%o list_of_exponent_ranges.append(range(1, max_exponent+1))

%o for exponents in product(*list_of_exponent_ranges):

%o total = 0

%o for i in range(1, k+1):

%o total += int(i**exponents[i-1])

%o if total > max_term:

%o total = 0

%o break

%o if total in seq_set:

%o seq_set.remove(total)

%o print(sorted(seq_set))

%Y Cf. A000217, A000330, A000537, A000538, A000539.

%K nonn,hard

%O 1,1

%A _Robert C. Lyons_, Jul 05 2023