login
Triangle read by rows: T(n,k) = 1 - A047999(n,k), 0 <= k <= n.
6

%I #34 May 26 2023 08:50:20

%S 0,0,0,0,1,0,0,0,0,0,0,1,1,1,0,0,0,1,1,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,

%T 0,0,0,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,0,0,0,1,0,1,1,1,1,1,0,1,0,0,0,

%U 0,0,1,1,1,1,0,0,0,0,0,1,1,1,0,1,1,1

%N Triangle read by rows: T(n,k) = 1 - A047999(n,k), 0 <= k <= n.

%C Sierpinski's triangle complemented.

%H Reinhard Zumkeller, <a href="/A219463/b219463.txt">Rows n = 0..128 of triangle, flattened</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/SierpinskiSieve.html">Sierpinski Sieve</a>

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Sierpinski_triangle">Sierpinski triangle</a>

%H <a href="/index/Pas#Pascal">Index entries for triangles and arrays related to Pascal's triangle</a>

%F T(n,k) = if T(n-1,k-1) = T(n-1,k) then 1 else 0, 0 < k < n.

%e The triangle begins:

%e 0: 0

%e 1: 0 0

%e 2: 0 1 0

%e 3: 0 0 0 0

%e 4: 0 1 1 1 0

%e 5: 0 0 1 1 0 0

%e 6: 0 1 0 1 0 1 0

%e 7: 0 0 0 0 0 0 0 0

%e 8: 0 1 1 1 1 1 1 1 0

%e 9: 0 0 1 1 1 1 1 1 0 0

%e 10: 0 1 0 1 1 1 1 1 0 1 0

%e 11: 0 0 0 0 1 1 1 1 0 0 0 0

%e 12: 0 1 1 1 0 1 1 1 0 1 1 1 0

%e 13: 0 0 1 1 0 0 1 1 0 0 1 1 0 0

%e 14: 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0

%e 15: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

%t A219463row[n_]:=Sign[BitAnd[Range[0, n], -1-n]];Array[A219463row,20,0] (* _Paolo Xausa_, May 22 2023 *)

%o (Haskell)

%o a219463 n k = a219463_tabl !! n !! k :: Int

%o a219463_row n = a219463_tabl !! n

%o a219463_tabl = map (map (1 -)) a047999_tabl

%o (PARI) T(n,k)= bitand(n-k, k) != 0; \\ _Joerg Arndt_, May 22 2023

%Y Cf. A000004 (left and right edges), A057427 (central terms), A048967 (row sums = number of ones per row), A001316 (number of zeros per row), A219843 (rows as binary numbers).

%K nonn,tabl

%O 0

%A _Reinhard Zumkeller_, Nov 30 2012