A060142 Ordered set S defined by these rules: 0 is in S and if x is in S then 2x+1 and 4x are in S.
0, 1, 3, 4, 7, 9, 12, 15, 16, 19, 25, 28, 31, 33, 36, 39, 48, 51, 57, 60, 63, 64, 67, 73, 76, 79, 97, 100, 103, 112, 115, 121, 124, 127, 129, 132, 135, 144, 147, 153, 156, 159, 192, 195, 201, 204, 207, 225, 228, 231, 240, 243, 249, 252, 255, 256, 259, 265, 268, 271
Offset: 0
Keywords
Examples
From _Harry Richman_, Jan 31 2024: (Start) In the following, dots are used for zeros in the binary representation: n binary(a(n)) a(n) 0: ....... 0 1: ......1 1 2: .....11 3 3: ....1.. 4 4: ....111 7 5: ...1..1 9 6: ...11.. 12 7: ...1111 15 8: ..1.... 16 9: ..1..11 19 10: ..11..1 25 11: ..111.. 28 12: ..11111 31 13: .1....1 33 14: .1..1.. 36 15: .1..111 39 16: .11.... 48 17: .11..11 51 18: .111..1 57 19: .1111.. 60 20: .111111 63 21: 1...... 64 22: 1....11 67 (End)
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
- Clark Kimberling, A Self-Generating Set and the Golden Mean, J. Integer Sequences, 3 (2000), #00.2.8.
- Clark Kimberling, Fusion, Fission, and Factors, Fib. Q., 52 (2014), 195-202.
- Lukasz Merta, Composition inverses of the variations of the Baum-Sweet sequence, arXiv:1803.00292 [math.NT], 2018. See l(n) p. 5.
- Gus Wiseman, Statistics, classes, and transformations of standard compositions
Crossrefs
Cf. A003714 (no consecutive 1's in binary expansion).
Odd partitions are counted by A000009.
Numbers with an odd number of 1's in binary expansion are A000069.
Numbers whose binary expansion has odd length are A053738.
All of the following pertain to compositions in standard order (A066099):
- Length is A000120.
- Compositions without odd parts are A062880.
- Sum is A070939.
- Product is A124758.
- Strict compositions are A233564.
- Heinz number is A333219.
- Number of distinct parts is A334028.
Programs
-
Haskell
import Data.Set (singleton, deleteFindMin, insert) a060142 n = a060142_list !! n a060142_list = 0 : f (singleton 1) where f s = x : f (insert (4 * x) $ insert (2 * x + 1) s') where (x, s') = deleteFindMin s -- Reinhard Zumkeller, Nov 26 2012
-
Mathematica
Take[Nest[Union[Flatten[# /. {{i_Integer -> i}, {i_Integer -> 2 i + 1}, {i_Integer -> 4 i}}]] &, {1}, 5], 32] (* Or *) Select[Range[124], FreeQ[Length /@ Select[Split[IntegerDigits[#, 2]], First[#] == 0 &], ?OddQ] &] (* _Birkas Gyorgy, May 29 2012 *)
-
PARI
is(n)=if(n<3, n<2, if(n%2,is(n\2),n%4==0 && is(n/4))) \\ Charles R Greathouse IV, Oct 21 2013
Extensions
Corrected by T. D. Noe, Nov 01 2006
Definition simplified by Charles R Greathouse IV, Oct 21 2013
Comments