The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A337238 Number k such that k and k+1 are both digitally balanced numbers in base 2 (A031443). 3
 9, 37, 41, 49, 141, 149, 153, 165, 169, 177, 197, 201, 209, 225, 541, 557, 565, 569, 589, 597, 601, 613, 617, 625, 653, 661, 665, 677, 681, 689, 709, 713, 721, 737, 781, 789, 793, 805, 809, 817, 837, 841, 849, 865, 901, 905, 913, 929, 961, 2109, 2141, 2157, 2165 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS All the terms are of the form 4*k + 1, where k is a digitally balanced number in base 2. Therefore, there are no 3 consecutive numbers that are digitally balanced in base 2. The number of terms below 2^k is A079309(floor(k/2)-1) for k > 3. LINKS Amiram Eldar, Table of n, a(n) for n = 1..10000 FORMULA a(n) = 4*A031443(n) + 1. EXAMPLE 9 is a term since the binary representation of 9 is 1001, which contains 2 0's and 2 1's, and the binary representation of 9 + 1 = 10 is 1010, which also contains 2 0's and 2 1's. MATHEMATICA digBalQ[n_] := Module[{d = IntegerDigits[n, 2], m}, EvenQ@(m = Length@d) && Count[d, 1] == m/2]; Select[Range[2000], digBalQ[#] && digBalQ[# + 1] &] CROSSREFS Cf. A031443, A079309, A191292. A206374 \ {2} is a subsequence. Sequence in context: A103758 A274769 A126914 * A273594 A041150 A042021 Adjacent sequences:  A337235 A337236 A337237 * A337239 A337240 A337241 KEYWORD nonn,base,easy AUTHOR Amiram Eldar, Nov 21 2020 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 17 23:13 EDT 2022. Contains 356204 sequences. (Running on oeis4.)