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 A249721 #12 Jun 30 2019 10:15:31 %S A249721 0,2,4,6,8,12,14,18,20,22,24,26,36,38,42,44,54,56,58,60,62,66,68,72, %T A249721 74,76,78,80,108,110,114,116,126,128,132,134,162,164,166,168,170,174, %U A249721 176,180,182,184,186,188,198,200,204,206,216,218,220,222,224,228,230,234,236,238,240,242,324 %N A249721 Numbers whose base-3 representation consists entirely of 0's and 2's, except possibly for a single pair of adjacent 1's among them. %C A249721 9 divides neither C(s-1,s/2) (= A001700(s/2)) nor C(s,s/2) (= A000984(s/2)) if and only if s = a(n). %H A249721 Antti Karttunen, <a href="/A249721/b249721.txt">Table of n, a(n) for n = 0..8192</a> %F A249721 a(n) = 2 * A051382(n). %e A249721 2, which in base 3 is also '2', satisfies the condition, thus it is included; %e A249721 4, which in base 3 is '11', is included; %e A249721 6, which in base 3 is '20', is included; %e A249721 8, which in base 3 is '22', is included; %e A249721 12, which in base 3 is '110', is included; %e A249721 14, which in base 3 is '112', is included; %e A249721 however, e.g., 13, 40, and 130, whose ternary representations are '111', '1111' and '11211' respectively, are not included, because they all contain more than one pair of 1's. %o A249721 (Scheme, with _Antti Karttunen_'s IntSeq-library) %o A249721 (define A249721 (MATCHING-POS 0 0 in_A249721?)) %o A249721 (define (in_A249721? n) (let loop ((n n) (seen11yet? #f)) (cond ((zero? n) #t) ((= 2 n) #t) ((modulo n 3) => (lambda (r) (let ((next_n (/ (- n r) 3))) (cond ((= r 1) (if (or seen11yet? (not (= 1 (modulo next_n 3)))) #f (loop (/ (- next_n 1) 3) #t))) (else (loop next_n seen11yet?))))))))) %o A249721 ;; Or alternatively, based on code for A051382: %o A249721 (define (A249721 n) (* 2 (A051382 n))) %Y A249721 Cf. A007089, A051382, A249719, A249720, A001700, A000984, A117966, A249733. %K A249721 nonn,base %O A249721 0,2 %A A249721 _Antti Karttunen_, Nov 14 2014