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.

A321525 Left-rotate nonzero digits in ternary expansion of n and convert back to decimal.

This page as a plain text file.
%I A321525 #8 Nov 14 2018 17:07:21
%S A321525 0,1,2,3,4,7,6,5,8,9,10,19,12,13,16,21,22,25,18,11,20,15,14,17,24,23,
%T A321525 26,27,28,55,30,31,34,57,58,61,36,37,46,39,40,43,48,49,52,63,64,73,66,
%U A321525 67,70,75,76,79,54,29,56,33,32,35,60,59,62,45,38,47,42,41
%N A321525 Left-rotate nonzero digits in ternary expansion of n and convert back to decimal.
%C A321525 This sequence is a permutation of the nonnegative integers with inverse A321524.
%H A321525 Rémy Sigrist, <a href="/A321525/b321525.txt">Table of n, a(n) for n = 0..6561</a>
%H A321525 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A321525 a(3 * n) = 3 * a(n).
%e A321525 The first terms, alongside the corresponding ternary representations, are:
%e A321525   n   a(n)  ter(n)  ter(a(n))
%e A321525   --  ----  ------  ---------
%e A321525    0     0       0          0
%e A321525    1     1       1          1
%e A321525    2     2       2          2
%e A321525    3     3      10         10
%e A321525    4     4      11         11
%e A321525    5     7      12         21
%e A321525    6     6      20         20
%e A321525    7     5      21         12
%e A321525    8     8      22         22
%e A321525    9     9     100        100
%e A321525   10    10     101        101
%e A321525   11    19     102        201
%e A321525   12    12     110        110
%e A321525   13    13     111        111
%e A321525   14    16     112        121
%e A321525   15    21     120        210
%e A321525   16    22     121        211
%e A321525   17    25     122        221
%o A321525 (PARI) a(n, base=3) = my (d=digits(n, base), t=select(sign, d), i=0); for (j=1, #d, if (d[j], d[j]=t[1+(i++%#t)])); fromdigits(d, base)
%Y A321525 Cf. A321464, A321524 (inverse).
%K A321525 nonn,base
%O A321525 0,3
%A A321525 _Rémy Sigrist_, Nov 13 2018