### Related

ifactors(16758);

Calculate

##### ifactors-mod-primep-totient

next_primep(45641);

p:45641;

ifactors(p-1);

Calculate

##### ifactors-primep

primep(542436256);

p:325231;

ifactors(p);

Calculate

##### ifactors

ifactors(963589700510...

Calculate

ifactors(138);

ifactors(883);

jacobi(97,3);

Calculate

##### ifactors

ifactors(9999999999971);

sqr(9999999999971);

Calculate

##### ifactors-is-lambda-length-second-sublist

is( length( sublist(i...

sublist(ifactors(272)...

Calculate

##### ifactors-random

var1: random(2500);

var2: ifactors(var1);

var2.size();

Calculate

##### ifactors-random

var1: random(2500);

var2: ifactors(var1);

var;

Calculate

##### ifactors-totient

ifactors(34035);

(3-1)*(5-1)*(2269-1);

totient(18144);

Calculate

### ifactors

Run Example
```(%i1)joukko:[30, 42, 70];
(%o1)                            [30, 42, 70]
(%i2) luku: joukko[random(3)];
(%o2)                                 42
(%i3) factors_only: true;
(%o3)                                true
(%i4) tekijat: ifactors(luku);
(%o4)                              [2, 3, 7]
(%i5) delete(3, tekijat);
(%o5)                               [2, 7]
(%i6) ```
Run Example
```phi(n) := block(    [lst : ifactors(n)],    product(map(lambda([x], (first(x)-1) * first(rest(x))), lst)[i], i, 1, length(lst)));
(%o1) phi(n) := block([lst : ifactors(n)],
product(map(lambda([x], (first(x) - 1) first(rest(x))), lst) , i, 1,
i
length(lst)))
(%i2) trace(phi);
(%o2)                                [phi]
(%i3) trace(map);
(%o3)                                [map]
(%i4) trace(product);
(%o4)                              [product]
(%i5) trace(ifactors);
(%o5)                             [ifactors]
(%i6) map(lambda([x], phi(x)), [56]) ;
1 Enter map [map(lambda([x], phi(x)), [56])]
1 Enter phi [56]
1 Enter ifactors [56]
1 Exit  ifactors [[2, 3], [7, 1]]
1 Enter product
[product(map(lambda([x], (first(x) - 1) first(rest(x))), lst) , i, 1,
i
length(lst))]
2 Enter map [map(lambda([x], (first(x) - 1) first(rest(x))), lst)]
2 Exit  map [3, 6]
2 Enter map [map(lambda([x], (first(x) - 1) first(rest(x))), lst)]
2 Exit  map [3, 6]
1 Exit  product 18
1 Exit  phi 18
1 Exit  map [18]
(%o6)                                [18]
(%i7) ```
Run Example
```ifactors(563);
(%o1)                             [[563, 1]]
(%i2) mod(73,3);
(%o2)                                  1
(%i3) ```

### Related Help

Help for Ifactors