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.

A348355 The base-7 expansion of a(n) is obtained by replacing 1's, 2's, 3's, 4's, 5's and 6's by 4's, 5's, 6's, 1's, 2's and 3's, respectively, in the base-7 expansion of n.

This page as a plain text file.
%I A348355 #11 Oct 18 2021 01:38:50
%S A348355 0,4,5,6,1,2,3,28,32,33,34,29,30,31,35,39,40,41,36,37,38,42,46,47,48,
%T A348355 43,44,45,7,11,12,13,8,9,10,14,18,19,20,15,16,17,21,25,26,27,22,23,24,
%U A348355 196,200,201,202,197,198,199,224,228,229,230,225,226,227,231
%N A348355 The base-7 expansion of a(n) is obtained by replacing 1's, 2's, 3's, 4's, 5's and 6's by 4's, 5's, 6's, 1's, 2's and 3's, respectively, in the base-7 expansion of n.
%C A348355 This sequence is a self-inverse permutation of the nonnegative integers.
%C A348355 It is possible to build a similar sequence for any fixed base b > 1 and any permutation p of {1, ..., b-1}.
%C A348355 This sequence is interesting as it satisfies f(a(n)) = -f(n), where f(n) = (A334492(n), A334493(n)).
%H A348355 Rémy Sigrist, <a href="/A348355/b348355.txt">Table of n, a(n) for n = 0..2400</a>
%H A348355 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%e A348355 The first terms, in decimal and in base 7, are:
%e A348355   n   a(n)  s(n)  s(a(n))
%e A348355   --  ----  ----  -------
%e A348355    0     0     0        0
%e A348355    1     4     1        4
%e A348355    2     5     2        5
%e A348355    3     6     3        6
%e A348355    4     1     4        1
%e A348355    5     2     5        2
%e A348355    6     3     6        3
%e A348355    7    28    10       40
%e A348355    8    32    11       44
%e A348355    9    33    12       45
%e A348355   10    34    13       46
%t A348355 a[n_] := With[{d = {0, 4, 5, 6, 1, 2, 3}}, FromDigits[d[[IntegerDigits[n, 7] + 1]], 7]]; Array[a, 64, 0] (* _Amiram Eldar_, Oct 16 2021 *)
%o A348355 (PARI) a(n, p=[4,5,6,1,2,3]) = fromdigits(apply(d -> if (d, p[d], 0), digits(n, #p+1)), #p+1)
%Y A348355 See A004488, A048647 and A348354 for similar sequences.
%Y A348355 Cf. A334492, A334493.
%K A348355 nonn,base,easy
%O A348355 0,2
%A A348355 _Rémy Sigrist_, Oct 14 2021