2008-01-14 11:33:08 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								USING: help.markup help.syntax math sequences ;
							 | 
						
					
						
							
								
									
										
										
										
											2007-12-27 09:03:22 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								IN: math.primes.factors
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-29 10:55:44 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ divisors factors group-factors unique-factors } related-words
							 | 
						
					
						
							
								
									
										
										
										
											2007-12-27 09:03:22 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								HELP: factors
							 | 
						
					
						
							
								
									
										
										
										
											2008-01-14 11:33:08 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ $values { "n" "a positive integer" } { "seq" sequence } }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ $description { "Return an ordered list of a number's prime factors, possibly repeated." } }
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-11 22:01:39 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ $examples { $example "USING: math.primes.factors prettyprint ;" "300 factors ." "{ 2 2 3 5 5 }" } } ;
							 | 
						
					
						
							
								
									
										
										
										
											2007-12-27 09:03:22 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2008-01-14 11:33:08 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								HELP: group-factors
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ $values { "n" "a positive integer" } { "seq" sequence } }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ $description { "Return a sequence of pairs representing each prime factor in the number and its corresponding power (multiplicity)." } }
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-11 22:01:39 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ $examples { $example "USING: math.primes.factors prettyprint ;" "300 group-factors ." "{ { 2 2 } { 3 1 } { 5 2 } }" } } ;
							 | 
						
					
						
							
								
									
										
										
										
											2007-12-27 09:03:22 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								HELP: unique-factors
							 | 
						
					
						
							
								
									
										
										
										
											2008-01-14 11:33:08 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ $values { "n" "a positive integer" } { "seq" sequence } }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ $description { "Return an ordered list of a number's unique prime factors." } }
							 | 
						
					
						
							
								
									
										
										
										
											2008-03-11 22:01:39 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ $examples { $example "USING: math.primes.factors prettyprint ;" "300 unique-factors ." "{ 2 3 5 }" } } ;
							 | 
						
					
						
							
								
									
										
										
										
											2007-12-27 09:03:22 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								HELP: totient
							 | 
						
					
						
							
								
									
										
										
										
											2008-01-14 11:33:08 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ $values { "n" "a positive integer" } { "t" integer } }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ $description { "Return the number of integers between 1 and " { $snippet "n-1" } " that are relatively prime to " { $snippet "n" } "." } } ;
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-29 10:55:44 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								HELP: divisors
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ $values { "n" "a positive integer" } { "seq" sequence } }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{ $description { "Return the ordered list of divisors of " { $snippet "n" } ", including 1 and " { $snippet "n" } "." } } ;
							 |