OFFSET
1,3
COMMENTS
No runs of 1-bits of odd length allowed in the binary expansion of n (A007088), except that when n is an odd number, then the rightmost run may have an odd length. Subsequence A277335 does not allow that exception.
Running maximum without repetition of the decimal equivalent of Gray code for n (A003188). - Frédéric Nouvier, Aug 14 2020
LINKS
FORMULA
PROG
(Scheme, with Antti Karttunen's IntSeq-library)
(Rust)
fn main() {
for i in (0..2048)
// Filter to get A003714
.filter(|n| n & (n << 1) == 0)
// Map to produce A295897
.map(|n| n ^ (n >> 1))
{
println!("{}", i);
}
} // Frédéric Nouvier, Aug 14 2020
(Python)
[x ^ (x>>1) for x in range(0, 2048) if (x & (x<<1) == 0)]
# Frédéric Nouvier, Aug 14 2020
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Dec 01 2017
STATUS
approved