login
Walsh matrix antidiagonals converted to decimal.
3

%I #38 Mar 29 2014 02:42:26

%S 1,3,5,15,17,51,93,255,257,771,1453,3855,4593,13299,23901,65535,65537,

%T 196611,371373,983055,1175281,3394803,6103645,16711935,16908033,

%U 50593539,95245741,252706575,301011441,871576563,1566432605,4294967295

%N Walsh matrix antidiagonals converted to decimal.

%C Infinite Walsh matrix with the negative ones replaced by zeros (negated binary Walsh matrix), the antidiagonals read as binary numbers.

%C This sequence is similar to A001317 (Sierpinski triangle rows converted to decimal). a(n) = A001317(n) iff n=0 or n is an element of A099627.

%H Tilman Piesk, <a href="/A197818/b197818.txt">Table of n, a(n) for n = 0..1023</a>

%H Tilman Piesk, <a href="http://commons.wikimedia.org/wiki/File:Binary_Walsh_matrix_256_neg.svg">Negated binary Walsh matrix of size 256</a>

%H Tilman Piesk, <a href="http://commons.wikimedia.org/wiki/File:Binary_Walsh_matrix_256_neg;_diags_to_cols.svg">The antidiagonals shown in a triangular matrix</a>

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Walsh_matrix">Walsh matrix</a>

%e Top left corner of the negated binary Walsh matrix:

%e 1 1 1 1 1 1 1 1

%e 1 0 1 0 1 0 1 0

%e 1 1 0 0 1 1 0 0

%e 1 0 0 1 1 0 0 1

%e 1 1 1 1 0 0 0 0

%e 1 0 1 0 0 1 0 1

%e 1 1 0 0 0 0 1 1

%e 1 0 0 1 0 1 1 0

%e The antidiagonals in binary and decimal are:

%e 1 = 1

%e 11 = 3

%e 101 = 5

%e 1111 = 15

%e 10001 = 17

%e 110011 = 51

%e 1011101 = 93

%e 11111111 = 255

%o (PARI)

%o N=2^5; /* a power of 2 */

%o parity(x)= {

%o my(s=1);

%o while ( (x>>s), x=bitxor(x, x>>s); s+=s; );

%o return( bitand(x,1) );

%o }

%o W = matrix(N,N, i,j, if(parity(bitand(i-1,j-1)),0,1); );

%o a(n) = sum(k=0,n, 2^k * W[n-k+1,k+1] );

%o vector(N,n,a(n-1))

%o /* _Joerg Arndt_, Mar 27 2013 */

%Y Cf. A001317, A099627.

%K nonn,base

%O 0,2

%A _Tilman Piesk_, Oct 18 2011