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.

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

This page as a plain text file.
%I A362946 #20 Jul 06 2023 09:48:48
%S A362946 2,4,7,11,13,19,25,31
%N A362946 Positive integers that cannot be expressed as 1^e_1 + 2^e_2 + 3^e_3 ... + k^e_k with each exponent positive.
%C A362946 I conjecture that this list is finite.
%e A362946 1 is not in the sequence because it's equal to 1^1.
%e A362946 3 is not in the sequence because it's equal to 1^1 + 2^1.
%e A362946 20 is not in the sequence because it's equal to 1^1 + 2^4 + 3^1.
%e A362946 29 is not in the sequence because it's equal to 1^1 + 2^2 + 3^1 + 4^2 + 5^1.
%o A362946 (Python)
%o A362946 from itertools import product
%o A362946 import math
%o A362946 max_term = 250
%o A362946 seq_set = set(range(1, max_term+1))
%o A362946 # Use the quadratic formula to calculate the maximum value for k,
%o A362946 # such that 1^1 + 2^1 + 3^1 + ... + k^1 is less than max_term.
%o A362946 max_k = int((-1 + math.sqrt(1 + 8 * max_term))/2.0) + 1
%o A362946 for k in range(1, max_k+1):
%o A362946     list_of_exponent_ranges = [range(1,2)]
%o A362946     for i in range(2, k+1):
%o A362946         max_exponent = int(math.log(max_term, i))
%o A362946         list_of_exponent_ranges.append(range(1, max_exponent+1))
%o A362946     for exponents in product(*list_of_exponent_ranges):
%o A362946         total = 0
%o A362946         for i in range(1, k+1):
%o A362946             total += int(i**exponents[i-1])
%o A362946             if total > max_term:
%o A362946                 total = 0
%o A362946                 break
%o A362946         if total in seq_set:
%o A362946             seq_set.remove(total)
%o A362946 print(sorted(seq_set))
%Y A362946 Cf. A000217, A000330, A000537, A000538, A000539.
%K A362946 nonn,hard
%O A362946 1,1
%A A362946 _Robert C. Lyons_, Jul 05 2023