This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A328727 #15 Jan 24 2022 17:07:49 %S A328727 0,1,2,3,6,9,10,11,18,19,20,27,28,29,30,33,54,55,56,57,60,81,82,83,84, %T A328727 87,90,91,92,99,100,101,162,163,164,165,168,171,172,173,180,181,182, %U A328727 243,244,245,246,249,252,253,254,261,262,263,270,271,272,273,276 %N A328727 Nonnegative numbers whose base-3 expansion has no two consecutive nonzero digits. %C A328727 This sequence is a ternary variant of A003714, the fibbinary numbers. %C A328727 Apparently, A122983 gives the distinct values of the first differences of this sequence. %H A328727 Rémy Sigrist, <a href="/A328727/b328727.txt">Table of n, a(n) for n = 1..10923</a> (Terms < 3^13) %e A328727 The first terms, alongside their ternary representation, are: %e A328727 n a(n) ter(a(n)) %e A328727 -- ---- --------- %e A328727 1 0 0 %e A328727 2 1 1 %e A328727 3 2 2 %e A328727 4 3 10 %e A328727 5 6 20 %e A328727 6 9 100 %e A328727 7 10 101 %e A328727 8 11 102 %e A328727 9 18 200 %e A328727 10 19 201 %e A328727 11 20 202 %e A328727 12 27 1000 %o A328727 (PARI) is(n, base=3) = my (d=digits(n, base)); for (i=1, #d-1, if (d[i] && d[i+1], return (0))); return (1) %o A328727 (Python) %o A328727 from itertools import count, islice %o A328727 from gmpy2 import digits %o A328727 def A328727_gen(startvalue=0): # generator of terms >= startvalue %o A328727 for n in count(max(startvalue,0)): %o A328727 s = digits(n,3) %o A328727 for i in range(len(s)-1): %o A328727 if '0' not in s[i:i+2]: %o A328727 break %o A328727 else: %o A328727 yield n %o A328727 A328727_list = list(islice(A328727_gen(),30)) # _Chai Wah Wu_, Jan 24 2022 %Y A328727 Cf. A003714, A122983. %K A328727 nonn,base,easy %O A328727 1,3 %A A328727 _Rémy Sigrist_, Oct 26 2019