OFFSET
1,2
COMMENTS
Probably a(n) exists for every n in N.
If n = 2*k, then a(n) - 1 or a(n) + n is of the form 2^e. - Jinyuan Wang, Mar 21 2020
LINKS
Franz Vrabec, Table of n, a(n) for n = 1..250
EXAMPLE
a(3) = 20 because the first run of 3 ones in A014963 begins at position 20.
PROG
(PARI) a(n) = if(n%2, my(c=0); for(k=1, oo, if(isprimepower(k), if(c==n, return(k-n), c=0), c++)), my(m=1); for(k=1, oo, m*=2; if(isprimepower(m-n-1) && sum(i=m-n, m-1, isprimepower(i))==0, return(m-n)); if(isprimepower(m+n+1) && sum(i=m+1, m+n, isprimepower(i))==0, return(m+1)))); \\ Jinyuan Wang, Mar 21 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Franz Vrabec, Sep 27 2005
STATUS
approved