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 A381608 #6 Mar 03 2025 09:33:07 %S A381608 0,1,2,3,4,5,6,7,9,10,11,12,13,14,15,16,18,19,20,21,22,27,28,29,30,31, %T A381608 32,33,34,36,37,38,39,40,41,42,43,45,46,47,48,49,54,55,56,57,58,59,60, %U A381608 61,63,64,65,66,67,81,82,83,84,85,86,87,88,90,91,92,93 %N A381608 Nonnegative integers whose ternary expansion does not contain pairs of 2's only separated by (zero or more) 1's, with offset 0. %C A381608 The ternary expansion of a(n) equals the decimal expansion of A381579(n). %H A381608 Rémy Sigrist, <a href="/A381608/b381608.txt">Table of n, a(n) for n = 0..6560</a> %F A381608 a(n) = A028898(A381579(n)). %F A381608 A381607(a(n)) = n. %e A381608 The ternary expansion of 20, "211", has no pairs of 2's, so 20 belongs to the sequence.The ternary expansion of 21, "212", has a pair of 2s only separated by 1's, so 21 does not belong to the sequence. %o A381608 (PARI) a(n) = { for (k = 1, oo, my (f = fibonacci(2*k)); if (f >= n, my (v = 0); while (n, while (n >= f, n -= f; v += 3^(k-1);); f = fibonacci(2*k--);); return (v););); } %Y A381608 Cf. A028898, A381579, A381607. %K A381608 nonn,base %O A381608 0,3 %A A381608 _Rémy Sigrist_, Mar 01 2025