[go: up one dir, main page]

login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A363674 T(n,k) is the decimal equivalent of the n-bit inverted Gray code for k; triangle T(n,k), n>=0, 0<=k<=2^n-1, read by rows. 4

%I #40 Jul 14 2023 11:51:49

%S 0,1,0,3,2,0,1,7,6,4,5,1,0,2,3,15,14,12,13,9,8,10,11,3,2,0,1,5,4,6,7,

%T 31,30,28,29,25,24,26,27,19,18,16,17,21,20,22,23,7,6,4,5,1,0,2,3,11,

%U 10,8,9,13,12,14,15,63,62,60,61,57,56,58,59,51,50,48

%N T(n,k) is the decimal equivalent of the n-bit inverted Gray code for k; triangle T(n,k), n>=0, 0<=k<=2^n-1, read by rows.

%C Row n is a permutation of {0, 1, ..., A000225(n)}.

%H Alois P. Heinz, <a href="/A363674/b363674.txt">Rows n = 0..14, flattened</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Gray_code">Gray code</a>

%F T(n,k) = 2^n - 1 - A003188(k) = A000225(n) - A003188(k).

%F Sum_{k=0..2^n-1} (-1)^k * T(n,k) = A063524(n).

%F T(n,0) = T(n+1,2^(n+1)-1) = A000225(n).

%F T(n,A000975(n)) = 0.

%F T(n,A097072(n)) = 1 for n >= 1.

%F T(n,k) = T(n-1,k) + 2^(n-1) for n >= 1 and 0 <= k < 2^(n-1).

%F T(n,k) = T(n-1,2^n-1-k) for n >= 1 and 2^(n-1) <= k < 2^n.

%F A000120(T(n,n)) = A236840(n).

%e Triangle T(n,k) begins:

%e 0;

%e 1, 0;

%e 3, 2, 0, 1;

%e 7, 6, 4, 5, 1, 0, 2, 3;

%e 15, 14, 12, 13, 9, 8, 10, 11, 3, 2, 0, 1, 5, 4, 6, 7;

%e ...

%e T(n,k) written in n-bit binary begins:

%e ();

%e 1, 0;

%e 11, 10, 00, 01;

%e 111, 110, 100, 101, 001, 000, 010, 011;

%e 1111, 1110, 1100, 1101, 1001, 1000, 1010, 1011, 0011, 0010, 0000, ...;

%e ...

%p T:= (n, k)-> Bits[Xor](2^n-1-k, iquo(k, 2)):

%p seq(seq(T(n, k), k=0..2^n-1), n=0..6);

%Y Columns k=0-2 give: A000225, A000918 (for n>=1), A028399 (for n>=2).

%Y Row sums give A006516.

%Y Cf. A000120, A000975, A003188, A063524, A097072, A236840, A329278, A331105, A362160.

%K nonn,tabf,look

%O 0,4

%A _Alois P. Heinz_, Jun 14 2023

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 29 23:09 EDT 2024. Contains 375519 sequences. (Running on oeis4.)