add more help text
This commit is contained in:
@@ -103,10 +103,19 @@ func divisors(cmd *cobra.Command, args []string) {
|
||||
|
||||
// divisorsCmd represents the divisors command
|
||||
var divisorsCmd = &cobra.Command{
|
||||
Use: "divisors",
|
||||
Use: "divisors -n N",
|
||||
Short: "Compute the divisor function for all numbers less than n",
|
||||
Long: `Compute the divisor function for all numbers less than n.`,
|
||||
Run: divisors,
|
||||
Long: `Compute the divisor function for all numbers less than n.
|
||||
|
||||
sigma_x(n) computes the sum of the xth powers of the divisors of n.
|
||||
For example, the divisors of 12 are 1, 2, 3, 4, 6, and 12.
|
||||
sigma_0(12) = 6
|
||||
sigma_1(12) = 1 + 2 + 3 + 4 + 6 + 12 = 28
|
||||
sigma_2(12) = 1^2 + 2^2 + 3^2 + 4^2 + 6^2 + 12^2 = 210
|
||||
|
||||
This program computes sigma for all values less than the input n.
|
||||
Provide the --exponent flag to set the desired exponent for each sum.`,
|
||||
Run: divisors,
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
||||
Reference in New Issue
Block a user