add more help text
This commit is contained in:
@@ -73,10 +73,16 @@ func mobius(cmd *cobra.Command, args []string) {
|
||||
|
||||
// mobiusCmd represents the mobius command
|
||||
var mobiusCmd = &cobra.Command{
|
||||
Use: "mobius",
|
||||
Use: "mobius -n N",
|
||||
Short: "Compute the Möbius function for all numbers less than n",
|
||||
Long: `Compute the Möbius function for all numbers less than n.`,
|
||||
Run: mobius,
|
||||
Long: `Compute the Möbius function for all numbers less than n.
|
||||
|
||||
The Möbius function mu(n) is a multiplicative function defined as follows for prime p:
|
||||
mu(p) = -1
|
||||
mu(p^k) = 0 for k > 1
|
||||
|
||||
This means for squarefree n, mu(n) = -1 if n has an odd number of prime factors and mu(n) = 1 if n has an even number of prime factors. mu(n) = 0 if n is not squarefree.`,
|
||||
Run: mobius,
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
||||
Reference in New Issue
Block a user