OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
N:= 10000: # for terms <= N
S:= 0, 2:
for k from 2 to floor(log[2](N)) do
for m from 2 do
v := m^k+m; if v > N then break fi;
S:= S, v;
od od:
sort(convert({S}, list)): # Robert Israel, Apr 28 2019, changed Jul 8 2021
MATHEMATICA
max = 1000; Sort[Flatten[Table[m^k + m, {m, 2, Floor[Sqrt[max]]}, {k, 2, Floor[Log[m, max]]}]]] (* Alonso del Arte, Jan 18 2015 *)
PROG
(Python)
def aupto(lim):
xkx = set(x**k + x for k in range(2, lim.bit_length()) for x in range(int(lim**(1/k))+2))
return sorted(filter(lambda t: t<=lim, xkx))
print(aupto(1500)) # Michael S. Branicky, Jul 08 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Jan 18 2015
EXTENSIONS
Changed to include 0 and 2 by Robert Israel, Jul 08 2021
STATUS
approved