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.

A353824 The positions of nonzero digits in the ternary expansions of n and a(n) are the same, and the k-th leftmost nonzero digit in a(n) equals modulo 3 the product of the k leftmost nonzero digits in n.

This page as a plain text file.
%I A353824 #10 May 10 2022 02:26:42
%S A353824 0,1,2,3,4,5,6,8,7,9,10,11,12,13,14,15,17,16,18,20,19,24,26,25,21,22,
%T A353824 23,27,28,29,30,31,32,33,35,34,36,37,38,39,40,41,42,44,43,45,47,46,51,
%U A353824 53,52,48,49,50,54,56,55,60,62,61,57,58,59,72,74,73,78,80
%N A353824 The positions of nonzero digits in the ternary expansions of n and a(n) are the same, and the k-th leftmost nonzero digit in a(n) equals modulo 3 the product of the k leftmost nonzero digits in n.
%C A353824 This sequence is a permutation of the nonnegative integers with inverse A353825.
%C A353824 A number is a fixed point of this sequence iff it has at most one digit 2 in its ternary expansion, that digit 2 being its rightmost nonzero digit.
%H A353824 Rémy Sigrist, <a href="/A353824/b353824.txt">Table of n, a(n) for n = 0..6561</a>
%H A353824 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A353824 a(3*n) = 3*a(n).
%e A353824 The first terms, in decimal and in ternary, are:
%e A353824   n   a(n)  ter(n)  ter(a(n))
%e A353824   --  ----  ------  ---------
%e A353824    0     0       0          0
%e A353824    1     1       1          1
%e A353824    2     2       2          2
%e A353824    3     3      10         10
%e A353824    4     4      11         11
%e A353824    5     5      12         12
%e A353824    6     6      20         20
%e A353824    7     8      21         22
%e A353824    8     7      22         21
%e A353824    9     9     100        100
%e A353824   10    10     101        101
%e A353824   11    11     102        102
%e A353824   12    12     110        110
%o A353824 (PARI) a(n) = { my (d=digits(n,3), p=1); for (k=1, #d, if (d[k], d[k]=p*=d[k])); fromdigits(d%3,3) }
%Y A353824 See A305458, A353826, A353828, A353830 for similar sequences.
%Y A353824 Cf. A353825 (inverse).
%K A353824 nonn,base
%O A353824 0,3
%A A353824 _Rémy Sigrist_, May 08 2022