OFFSET
1,3
COMMENTS
Equivalently, these are the numbers k such that each bit in the binary representation of k is next to a bit with the same value (and we consider that the first bit is next to the last bit). Hence, all terms of A033015 belong to this sequence.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
PROG
(PARI) is(n) = my (w=#binary(n)); sum(k=0, w-1, ((bittest(n, (k-1)%w)+bittest(n, k%w)+bittest(n, (k+1)%w))>=2) * 2^k)==n
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Mar 18 2021
STATUS
approved