cp's OEIS Frontend

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.

A305878 For any number n >= 0: apply the map 0 -> "0", 1 -> "01", 2 -> "011" to the ternary representation of n and interpret the result as a binary string.

This page as a plain text file.
%I A305878 #7 Jun 16 2018 13:44:14
%S A305878 0,1,3,2,5,11,6,13,27,4,9,19,10,21,43,22,45,91,12,25,51,26,53,107,54,
%T A305878 109,219,8,17,35,18,37,75,38,77,155,20,41,83,42,85,171,86,173,347,44,
%U A305878 89,179,90,181,363,182,365,731,24,49,99,50,101,203,102,205,411
%N A305878 For any number n >= 0: apply the map 0 -> "0", 1 -> "01", 2 -> "011" to the ternary representation of n and interpret the result as a binary string.
%C A305878 This sequence is a ternary analog of A048678.
%C A305878 This sequence is a permutation of A003726.
%H A305878 Rémy Sigrist, <a href="/A305878/a305878.png">Colored logarithmic scatterplot of the first 3^10 terms</a> (where the color is function of A053735(n) + A081604(n))
%F A305878 a(0) = 0.
%F A305878 a(3*n) = 2*a(n).
%F A305878 a(3*n + 1) = 4*a(n) + 1.
%F A305878 a(3*n + 2) = 8*a(n) + 3.
%F A305878 A000120(a(n)) = A053735(n).
%e A305878 The first terms, alongside the ternary representation of n and the binary representation of a(n), are:
%e A305878   n   a(n)  tern(n)  bin(a(n))
%e A305878   --  ----  -------  ---------
%e A305878    0     0        0          0
%e A305878    1     1        1          1
%e A305878    2     3        2         11
%e A305878    3     2       10         10
%e A305878    4     5       11        101
%e A305878    5    11       12       1011
%e A305878    6     6       20        110
%e A305878    7    13       21       1101
%e A305878    8    27       22      11011
%e A305878    9     4      100        100
%e A305878   10     9      101       1001
%e A305878   11    19      102      10011
%e A305878   12    10      110       1010
%o A305878 (PARI) a(n) = if (n==0, 0, my (d=n%3); a(n\3) * 2^(d+1) + (2^d-1))
%Y A305878 Cf. A000120, A003726, A048678, A053735, A081604.
%K A305878 nonn,base
%O A305878 0,3
%A A305878 _Rémy Sigrist_, Jun 13 2018