>>  <<  Ndx  Usr  Pri  Phr  Dic  Rel  Voc  !:  wd  Help  Dictionary

7. Tables

   div=: 0=rem=: i |/i=: i.7            Divisibility and remainder tables
   (,.i) ; rem ; div
+-+-------------+-------------+
|0|0 1 2 3 4 5 6|1 0 0 0 0 0 0|
|1|0 0 0 0 0 0 0|1 1 1 1 1 1 1|
|2|0 1 0 1 0 1 0|1 0 1 0 1 0 1|
|3|0 1 2 0 1 2 0|1 0 0 1 0 0 1|
|4|0 1 2 3 0 1 2|1 0 0 0 1 0 0|
|5|0 1 2 3 4 0 1|1 0 0 0 0 1 0|
|6|0 1 2 3 4 5 0|1 0 0 0 0 0 1|
+-+-------------+-------------+

   (i#~2=+/div);(2=+/div);(+/div)       Primes, test, # of divisors
+-----+-------------+-------------+
|2 3 5|0 0 1 1 0 1 0|7 1 2 2 3 2 4|
+-----+-------------+-------------+

   (=/~ ; </~ ; <:/~; ~:/~) i. 5
+---------+---------+---------+---------+
|1 0 0 0 0|0 1 1 1 1|1 1 1 1 1|0 1 1 1 1|
|0 1 0 0 0|0 0 1 1 1|0 1 1 1 1|1 0 1 1 1|
|0 0 1 0 0|0 0 0 1 1|0 0 1 1 1|1 1 0 1 1|
|0 0 0 1 0|0 0 0 0 1|0 0 0 1 1|1 1 1 0 1|
|0 0 0 0 1|0 0 0 0 0|0 0 0 0 1|1 1 1 1 0|
+---------+---------+---------+---------+

   t=: (/ ~) (@i.)                      Table adverb

   (=t;<t;<:t;~:t) 5
+---------+---------+---------+---------+
|1 0 0 0 0|0 1 1 1 1|1 1 1 1 1|0 1 1 1 1|
|0 1 0 0 0|0 0 1 1 1|0 1 1 1 1|1 0 1 1 1|
|0 0 1 0 0|0 0 0 1 1|0 0 1 1 1|1 1 0 1 1|
|0 0 0 1 0|0 0 0 0 1|0 0 0 1 1|1 1 1 0 1|
|0 0 0 0 1|0 0 0 0 0|0 0 0 0 1|1 1 1 1 0|
+---------+---------+---------+---------+

   (^t;!t;-t) 5
+-------------+---------+-------------+
|1 0  0  0   0|1 1 1 1 1|0 _1 _2 _3 _4|
|1 1  1  1   1|0 1 2 3 4|1  0 _1 _2 _3|
|1 2  4  8  16|0 0 1 3 6|2  1  0 _1 _2|
|1 3  9 27  81|0 0 0 1 4|3  2  1  0 _1|
|1 4 16 64 256|0 0 0 0 1|4  3  2  1  0|
+-------------+---------+-------------+



>>  <<  Ndx  Usr  Pri  Phr  Dic  Rel  Voc  !:  wd  Help  Dictionary