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.

A353660 The binary expansions of A352909(n+1, 1) and A352909(n+1, 2) encode respectively the 1's and the 2's in the ternary expansion of a(n).

This page as a plain text file.
%I A353660 #13 May 03 2022 17:05:25
%S A353660 0,2,1,6,3,8,7,5,4,18,9,20,19,11,10,24,21,15,12,26,25,23,22,17,16,14,
%T A353660 13,54,27,56,55,29,28,60,57,33,30,62,61,59,58,35,34,32,31,72,63,45,36,
%U A353660 74,73,65,64,47,46,38,37,78,75,69,66,51,48,42,39,80,79,77
%N A353660 The binary expansions of A352909(n+1, 1) and A352909(n+1, 2) encode respectively the 1's and the 2's in the ternary expansion of a(n).
%C A353660 This sequence is a permutation of the nonnegative integers with inverse A353661.
%H A353660 Rémy Sigrist, <a href="/A353660/b353660.txt">Table of n, a(n) for n = 0..6560</a>
%H A353660 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A353660 a(n) = A005836(A352909(n+1, 1)) + 2*A005836(A352909(n+1, 2)).
%F A353660 a(n) < 3^k iff n < 3^k.
%e A353660 For n = 42:
%e A353660 - A352909(43, 1) = 9,
%e A353660 - A352909(43, 2) = 2,
%e A353660 - the binary expansion of 9 is "1001",
%e A353660 - the binary expansion of 2 is "10",
%e A353660 - so the ternary expansion of a(42) is "1021",
%e A353660 - and a(42) = 34.
%o A353660 (PARI) b2t(n) = fromdigits(binary(n), 3)
%o A353660 { n=-1; for (d=0, 2^8-1, for (k=0, d, if (bitand(t1=k, t2=d-k)==0, print1 (b2t(t1) + 2*b2t(t2)", "); if (n++==67, break (2))))) }
%Y A353660 Cf. A005836, A352909, A353661 (inverse), A353662.
%K A353660 nonn,look,base
%O A353660 0,2
%A A353660 _Rémy Sigrist_, May 02 2022