A227987 If the run lengths of the binary representation of n are [1+r_1, 1+r_2, 1+r_3, ..., 1+r_k], then those of a(n) are [1+(r_1), 1+(r_1 XOR r_2), 1+(r_1 XOR r_2 XOR r_3), ..., 1+(r_1 XOR ... XOR r_k)], where XOR denotes the XOR binary operator.
1, 2, 3, 4, 5, 12, 7, 8, 19, 10, 11, 6, 51, 56, 15, 16, 71, 76, 9, 20, 21, 44, 23, 48, 13, 204, 25, 112, 455, 240, 31, 32, 271, 568, 143, 38, 307, 18, 79, 40, 83, 42, 43, 22, 179, 184, 47, 24, 783, 26, 27, 102, 819, 50, 207, 14, 1807, 3640, 911, 120, 3855
Offset: 1
Examples
For n=927: (1) binary representation of n = "1110011111", (2) run lengths of n = [1+2,1+1,1+4], (3) run lengths of a(n) = [1+(2),1+(2 XOR 1),1+(2 XOR 1 XOR 4)]=[3,4,8], (4) binary representation of a(n) = "111000011111111", (5) a(n) = 28927.
Links
Programs
-
Perl
# See Tek link.
Comments