OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
125 (125 = 5^3) and 128 (128 = 2^7) are consecutive perfect powers. Since one of these is odd and the other is even, then 125 is in this sequence.
MAPLE
N:= 3000:
PP:= {1, seq(seq(i^k, i=2..floor(N^(1/k))), k=2..ilog2(N))}:
PP:= sort(convert(PP, list)):
PP[select(t -> PP[t+1] mod 2 <> PP[t] mod 2, [$1..nops(PP)-1])]; # Robert Israel, May 21 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Dec 08 2009
EXTENSIONS
Extended by Ray Chandler, Dec 10 2009
STATUS
approved
