A380358 Numbers whose binary expansion ends with 11 and does not contain adjacent zeros.
3, 7, 11, 15, 23, 27, 31, 43, 47, 55, 59, 63, 87, 91, 95, 107, 111, 119, 123, 127, 171, 175, 183, 187, 191, 215, 219, 223, 235, 239, 247, 251, 255, 343, 347, 351, 363, 367, 375, 379, 383, 427, 431, 439, 443, 447, 471, 475, 479, 491, 495, 503, 507, 511, 683
Offset: 1
Examples
183 is in the sequence because its binary expansion is 10110111.
References
- J. L. Smith and A. Weinberger, "Shortcut Multiplication for Binary Digital Computers", in Methods for High-Speed Addition and Multiplication, National Bureau of Standards Circular 591, Sec. 1, February, 1958, page 21.
Links
- R. J. Cintra, A note on the conversion of nonnegative integers to the canonical signed-digit representation, arXiv:2501.10908 [eess.SP], 2025.
Programs
-
Mathematica
Select[4*Range[0, 170] + 3, SequencePosition[IntegerDigits[#, 2], {0, 0}] == {} &] (* Amiram Eldar, Feb 05 2025 *)
-
Python
from itertools import count, islice def A380358_gen(startvalue=1): # generator of terms >= startvalue return filter(lambda n:n&3==3 and not '00' in bin(n),count(max(startvalue,1))) A380358_list = list(islice(A380358_gen(),20)) # Chai Wah Wu, Feb 12 2025
Formula
a(n) = 2 * A247648(n) + 1.
From Hugo Pfoertner, Feb 07 2025: (Start)
a(n) = 4*A052499(n) - 1.
a(n) = 4*(A365808(n+1) + 1)/3 - 1.
a(n) = 2*(A365809(n) + 1)/3 - 1. (End)
Comments