A276795 Folding numbers with an odd number of bits (see A277238 for definition).
1, 6, 22, 28, 78, 90, 108, 120, 286, 310, 346, 370, 412, 436, 472, 496, 1086, 1134, 1206, 1254, 1338, 1386, 1458, 1506, 1596, 1644, 1716, 1764, 1848, 1896, 1968, 2016, 4222, 4318, 4462, 4558, 4726, 4822, 4966, 5062, 5242, 5338, 5482, 5578, 5746, 5842, 5986
Offset: 1
Examples
78 is binary 1001110. There is a 1 in the center bit. The first 3 bits (100) and the last 3 reversed (011) sums to 111, so 78 is in the sequence. 70 is binary 1000110. There is a 0 in the center bit, thus, despite the fact that the first and last 3 bits have the same relationship as above, 70 is not in the sequence.
Links
- Lars Blomberg, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
{1}~Join~Select[Flatten@ Array[Range[#, 2 # - 1] &[2^#] &[2 (# - 1)] &, 7], If[OddQ@ Length@ # && Take[#, {Ceiling[Length[#]/2]}] == {0}, False, Union[Take[#, Floor[Length[#]/2]] + Reverse@ Take[#, -Floor[ Length[#]/2]]] == {1}] &@ IntegerDigits[#, 2] &] (* Michael De Vlieger, Nov 25 2016 *)
Extensions
More terms from Lars Blomberg, Nov 09 2016
Comments