Comments from Herman Jamke (hermanjamke(AT)fastmail.fm), May 05 2007: (Start) The first term for which k does not exist is a(10) since neither for k=0 nor 1 do we get a perfect power and for k>1 2^k+10=2*(2^(k1)+5)=2*odd which can't be a perfect power since the exponent of 2 is not greater than 1.
For n=2*n' where n' is odd: if n+1 is a perfect power, a(n)=0; else if n+2 is a perfect power, a(n)=1. Otherwise a(n)=1 because if we assume, for some k>1, that 2^k + n = 2*(2^(k1) + n') is a perfect power m^e then, since 2^(k1)+n' is odd, m must have its factor 2 raised to a multiple of e equal to 1 and so e=1, a contradiction. For example:
a(2*1) = 1 since n+2=2*1+2=4, a perfect power.
a(2*3) = 1 since n+2=2*3+2=8, a perfect power.
a(2*5) = 1 since n+1=11 and n+2=12 are not perfect powers.
a(2*7) = 1 since n+2=2*7+2=16, a perfect power.
a(2*9) = 1 since n+1=19 and n+2=20 are not perfect powers.
a(2*11) = 1 since n+1=23 and n+2=24 are not perfect powers.
a(2*13) = 0 since n+1=2*13+1=27, a perfect power.
a(2*15) = 1 since n+2=2*15+2=32, a perfect power.
a(2*17) = 1 since n+2=2*17+2=36, a perfect power. (End)
