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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A350312 Narayana weighted representation of n (the bottom version). Also binary representation of numbers not containing 00 or 010 as a substring. 2
 0, 1, 10, 11, 101, 110, 111, 1011, 1101, 1110, 1111, 10110, 10111, 11011, 11101, 11110, 11111, 101101, 101110, 101111, 110110, 110111, 111011, 111101, 111110, 111111, 1011011, 1011101, 1011110, 1011111, 1101101, 1101110, 1101111, 1110110, 1110111, 1111011 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS a(n) equals binary representation of m, if and only if A350311(m) = n and for all k < m, A350311(k) < n. LINKS Table of n, a(n) for n=0..35. A.H.M. Smeets, The design of greedy number representations FORMULA Regular expression: 0|11*(0111*)*(0|01|011*)?. MATHEMATICA q[n_] := SequenceCount[IntegerDigits[n, 2], #] & /@ {{0, 0}, {0, 1, 0}} == {0, 0}; bin[n_] := FromDigits[IntegerDigits[n, 2]]; bin /@ Select[Range[0, 120], q] (* Amiram Eldar, Jan 27 2022 *) PROG (Python) # first method (as from definition) def A101(n): f0, f1, f2, r = 1, 1, 1, 0 while n > 0: if n%2 == 1: r = r+f0 n, f0, f1, f2 = n//2, f0+f2, f0, f1 return r n, a = 0, 0 while n < 36: if A101(a) == n: print(bin(a)[2:], end = ", ") n += 1 a += 1 (Python) # second method (as from regular expression) def test(n): s, i, n1 = bin(n)[2:], 0, 2 while i < len(s): if s[i] == "0": if n1 < 2: return 0 n1 = 0 else: n1 += 1 i += 1 return 1 n, a = 0, 0 while n < 36: if test(a): print(bin(a)[2:], end = ", ") n += 1 a += 1 CROSSREFS Cf. A000930, A048715, A350215 (top version), A350311. Fibonacci representations: A014417 (Zeckendorf), A104326 (dual Zeckendorf). Sequence in context: A203075 A104326 A205598 * A368804 A037090 A171676 Adjacent sequences: A350309 A350310 A350311 * A350313 A350314 A350315 KEYWORD nonn,base AUTHOR A.H.M. Smeets, Dec 24 2021 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 April 17 01:14 EDT 2024. Contains 371756 sequences. (Running on oeis4.)