Sponsored links: Algebra eBooks
 

Related

ifactors

ifactors(2016);

32*9*7;

Calculate

ifactors

n:3233;

e:17;

d:2753;

Calculate

ifactors-length-random

var1: random(2500);

var2: ifactors(var1);

length(var2);

Calculate

ifactors-length

(length(ifactors(360)));

Calculate

ifactors-lambda-second-sublist

ifactors(17);

sqs: sublist(ifactors...

sqs;

Calculate

ifactors

ifactors(6);

Calculate

ifactors

ifactors(53);

Calculate

ifactors-primep

next_primep(45641);

p:45641;

ifactors(p-1);

Calculate

ifactors-primep

primep(987);

p:131;

ifactors(p);

Calculate

ifactors

ifactors(123456789012...

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