OFFSET
1,1
COMMENTS
Is the sequence finite?
a(47) > 10^7 if it exists.
EXAMPLE
122500 is in the sequence because 122500 = 121169 + 11^3 is the only way to write 122500 as the sum of a prime and a nonnegative perfect power.
MAPLE
N:= 10^6: # to get all terms <= N
Primes:= select(isprime, [2, seq(i, i=3..N, 2)]):
Pows:= {0, 1, seq(seq(b^k, k=2..floor(log[b](N))), b=2..floor(sqrt(N)))}:
G:= expand(add(x^p, p=Primes)*add(x^r, r=Pows)):
B:= [seq(coeff(G, x, i), i=1..N)]:
select(t -> B[t]=1, [$1..N]);
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Robert Israel, Sep 27 2016
STATUS
approved