Binary Complement Reverse Sequence

A challenge by mousetail avatar mousetail

Description

The BCR sequence consists of numbers where, if you take the binary complement and reverse it, you get back the original number.

The Sequence on OEIS

10 is one example of a BCR number. When written in binary, 10 becomes 1010. Reverse 1010 to create 0101, and the complement of 0101 is 1010 which is 10 in decimal.

Print all the BCR numbers from 1 to 20,000, each on their own line.

Leaderboard

Author Bytes
#1 Openstreetmapler avatar Openstreetmapler 20
Challenge ended 1 weeks, 0 days ago ago
This challenge has ended. You are free to submit more solutions but they won't count for scoring.