login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A362946
Positive integers that cannot be expressed as 1^e_1 + 2^e_2 + 3^e_3 ... + k^e_k with each exponent positive.
0
2, 4, 7, 11, 13, 19, 25, 31
OFFSET
1,1
COMMENTS
I conjecture that this list is finite.
EXAMPLE
1 is not in the sequence because it's equal to 1^1.
3 is not in the sequence because it's equal to 1^1 + 2^1.
20 is not in the sequence because it's equal to 1^1 + 2^4 + 3^1.
29 is not in the sequence because it's equal to 1^1 + 2^2 + 3^1 + 4^2 + 5^1.
PROG
(Python)
from itertools import product
import math
max_term = 250
seq_set = set(range(1, max_term+1))
# Use the quadratic formula to calculate the maximum value for k,
# such that 1^1 + 2^1 + 3^1 + ... + k^1 is less than max_term.
max_k = int((-1 + math.sqrt(1 + 8 * max_term))/2.0) + 1
for k in range(1, max_k+1):
list_of_exponent_ranges = [range(1, 2)]
for i in range(2, k+1):
max_exponent = int(math.log(max_term, i))
list_of_exponent_ranges.append(range(1, max_exponent+1))
for exponents in product(*list_of_exponent_ranges):
total = 0
for i in range(1, k+1):
total += int(i**exponents[i-1])
if total > max_term:
total = 0
break
if total in seq_set:
seq_set.remove(total)
print(sorted(seq_set))
CROSSREFS
KEYWORD
nonn,hard
AUTHOR
Robert C. Lyons, Jul 05 2023
STATUS
approved