>>  <<  Usr  Pri  JfC  LJ  Phr  Dic  Rel  Voc  !:  Help  Dictionary

Prime Factors q:  0 0 0 Prime Exponents

q: y is the list of prime factors of a positive integer argument y . For example:
   y=: 105600
   q: y
2 2 2 2 2 2 2 3 5 5 11
   */ q: y
105600
   $ q: 1
0
   */ q: 1
1
   q: b. _1
*/
   q: _1+2^67x
193707721 761838257287
  If x is positive and finite, x q: y is the list of exponents in the prime decomposition of positive integer y, based upon the first x primes; if x is _ , a sufficient number of primes is used.

If x is negative and finite, x q: y is a 2-row table of the last |x primes and exponents in the prime factorization of y ; if x is __ , a sufficient number of primes is used. For example:

   2 q: 700
2 0
   10 q: 700
2 0 2 1 0 0 0 0 0 0
   _ q: 700
2 0 2 1

Currently, factors in the result of q: larger than 2^31 are tested to be prime according to a probabilistic algorithm (Miller-Rabin).

   ~.@q: 700                            NB. Distinct prime factors
2 5 7

   +/"1@=@q: 700                        NB. Exponents in prime factorization
2 2 1

   5 q: 144^100x
400 200 0 0 0

   __ q: 700
2 5 7
2 2 1

   __ q: !20x
 2 3 5 7 11 13 17 19
18 8 4 2  1  1  1  1

   y=: 100
   e=: _&q:                             NB. Completed list of exponents
   (e ; +:&.e ; -:&.e ; %&3&.e)y        NB. Exponents, square, sqrt, cube root
+-----+-----+--+-------+
|2 0 2|10000|10|4.64159|
+-----+-----+--+-------+

   V=: /@,:                             NB. For vectors of disparate lengths

   12 (+V&.e; -V&.e; >.V&.e; <.V&.e) y  NB. Product, quotient, LCM, GCD
+----+----+---+-+
|1200|0.12|300|4|
+----+----+---+-+

   totient=: * -.@%@~.&.q:              NB. Euler's totient function
   totient 700
240

   +/ 1 = 700 +. i.700
240


>>  <<  Usr  Pri  JfC  LJ  Phr  Dic  Rel  Voc  !:  Help  Dictionary