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.

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

This page as a plain text file.
%I A353662 #11 May 03 2022 19:27:24
%S A353662 0,-1,1,-3,3,-4,-2,2,4,-9,9,-10,-8,8,10,-12,-6,6,12,-13,-11,-7,-5,5,7,
%T A353662 11,13,-27,27,-28,-26,26,28,-30,-24,24,30,-31,-29,-25,-23,23,25,29,31,
%U A353662 -36,-18,18,36,-37,-35,-19,-17,17,19,35,37,-39,-33,-21,-15,15
%N A353662 The binary expansions of A352909(n+1, 1) and A352909(n+1, 2) encode respectively the 1's and the -1's in the balanced ternary expansion of a(n).
%C A353662 This sequence is a permutation from the nonnegative integers onto the integers (Z).
%H A353662 Rémy Sigrist, <a href="/A353662/b353662.txt">Table of n, a(n) for n = 0..6560</a>
%F A353662 a(n) = A005836(A352909(n+1, 1)) - A005836(A352909(n+1, 2)).
%F A353662 a(n) = A117966(A353660(n)).
%F A353662 Sum_{k = 0..n} a(k) = 0 iff n = 0 or n belongs to A074330.
%e A353662 For n = 42:
%e A353662 - A352909(43, 1) = 9,
%e A353662 - A352909(43, 2) = 2,
%e A353662 - the binary expansion of 9 is "1001",
%e A353662 - the binary expansion of 2 is "10",
%e A353662 - so the balanced ternary expansion of a(42) is "10T1",
%e A353662 - and a(42) = 25.
%o A353662 (PARI) b2t(n) = fromdigits(binary(n), 3)
%o A353662 { n=-1; for (d=0, 2^8-1, for (k=0, d, if (bitand(t1=k, t2=d-k)==0, print1 (b2t(t1) - b2t(t2)", "); if (n++==61, break (2))))) }
%Y A353662 Cf. A005836, A074330, A117966, A352909, A353660.
%K A353662 sign,base
%O A353662 0,4
%A A353662 _Rémy Sigrist_, May 02 2022