Sponsored links: Algebra eBooks
 

Related

ifactors-primep

primep(54134);

p:325231;

ifactors(p);

Calculate

ifactors-lambda-length-second-sublist

ifactors(17);

sqs: sublist(ifactors...

is(length(sqs) > 1);

Calculate

ifactors-primep

primep(131);

p:325231;

ifactors(p);

Calculate

ifactors-next_prime

p1:next_prime(1111111...

p2:next_prime(2133345...

p:p1*p2;

Calculate

ifactors

ifactors(34035);

Calculate

ifactors-primep

primep(124213);

p:131;

ifactors(p);

Calculate

ifactors-length

(length(ifactors(360)));

Calculate

ifactors-next_prime-totient

p1:next_prime(1111112...

p2:next_prime(4534576...

p:p1*p2;

Calculate

ifactors-next_prime

p1:next_prime(5456498...

p2:next_prime (464648...

p:p1*p2;

Calculate

ifactors-mod

ifactors(429);

mod(563,3);

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