login
A351661
a(n) is the smallest integer m (m > 2n) not the sum of one or more nonzero powers of n, n+1, ..., 2n.
1
1, 6, 10, 17, 130, 262, 2341, 9576, 144563, 1757032, 9269216, 403525711, 9339823147
OFFSET
0,2
COMMENTS
a(n) cannot be written as Sum_{i=n..2n} c_i*i^k_i, where c_i = 0 or 1 and k_i is a positive integer.
EXAMPLE
a(2) = 10 because 5 = 2 + 3; 6 = 2 + 4; 7 = 3 + 4; 8 = 2^3; 9 = 3^2 = 2 + 3 + 4; and 10 is the smallest integer > 2*2 not the sum of nonzero powers of 2, 3, and 4.
PROG
(Python)
from itertools import product, combinations
def check(M):
for L in product(*M):
for i in range(1, len(L)+1):
for c in set(combinations(L, i)):
s = sum(c); W.add(s)
if s == m: return 1
m_max, R = 10**8, [1]
for n in range(1, 10):
N, W = [], set()
for m in range(n, 2*n + 1): N.append({m})
for m in range(2*n + 1, m_max):
for i in range(len(N)):
t = max(N[i])*min(N[i])
while 1 < t <= m:
if t == m: W.add(t)
N[i].add(t); t = max(N[i])*min(N[i])
if m in W or check(N): continue
R.append(m); break
print(*R, sep = ', ')
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Ya-Ping Lu, Feb 19 2022
EXTENSIONS
a(10) from Jon E. Schoenfield, Feb 25 2022
a(11)-a(12) from Bert Dobbelaere, Apr 09 2022
STATUS
approved