A143536 Triangle read by rows, T(n,k) = 1 if n is prime, 0 otherwise.
0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1
Examples
First few rows of the triangle = 0; 1, 1; 1, 1, 1; 0, 0, 0, 0; 1, 1, 1, 1, 1; 0, 0, 0, 0, 0, 0; 1, 1, 1, 1, 1, 1, 1; ...
Links
- Reinhard Zumkeller, Rows n = 1..125 of table, flattened
Programs
-
Haskell
a143536 n k = a143536_tabl !! (n-1) !! (k-1) a143536_row n = a143536_tabl !! (n-1) a143536_tabl = zipWith take [1..] $ map repeat a010051_list -- Reinhard Zumkeller, Mar 21 2014
Comments