OFFSET
1,2
COMMENTS
Apart from 1 and 4, all terms == 2 (mod 4). - Robert Israel, Jun 25 2018
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
Odd numbers greater than 1 are differences of squares, so they are not here.
8 is not a term, 9 - 1: difference of two squares;
26 is not a term, 27 - 1: difference of two cubes.
MAPLE
N:= 1000: # to get all terms <= N
S:= {1, 2, 4, seq(i, i=6..N, 4)}:
for p from 3 to ilog2(N+1) do
for n from 1 while n^p - (n-1)^p <= N do
if n^p > N then m0:= ceil((n^p - N)^(1/p)) else m0:= 1 fi;
for m from m0 to n-1 do
v:= n^p-m^p;
S:= S minus {v};
od
od od:
sort(convert(S, list)); # Robert Israel, Jun 25 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Adam Kertesz, Apr 29 2018
STATUS
approved