A171781 Numbers for which the second bit of the binary expansion is equal to the last bit.
2, 3, 4, 7, 8, 10, 13, 15, 16, 18, 20, 22, 25, 27, 29, 31, 32, 34, 36, 38, 40, 42, 44, 46, 49, 51, 53, 55, 57, 59, 61, 63, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125
Offset: 1
Examples
10 is a term since its binary representation is 1010 and both its second and last bits are 0. - _Amiram Eldar_, Sep 01 2020
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Select[Range[2, 125], (d = IntegerDigits[#, 2])[[2]] == d[[-1]] &] (* Amiram Eldar, Sep 01 2020 *)
Comments