This site is supported by donations to The OEIS Foundation.

Template:Distinct nontrivial prime factors

From OeisWiki
Jump to: navigation, search

The {{distinct nontrivial prime factors}} (or {{dpf lt n}}) arithmetic function template returns a list of distinct nontrivial prime factors of a nonzero integer, otherwise returns an error message.

Usage

{{distinct nontrivial prime factors|a nonzero integer|sep = list items separator (default ,)}}

or

{{distinct nontrivial prime factors|a nonzero integer|list items separator (default ,)}}

or

{{dpf lt n|a nonzero integer|sep = list items separator (default ,)}}

or

{{dpf lt n|a nonzero integer|list items separator (default ,)}}

Examples

Examples with valid input

code result
{{dpf lt n|-28}} 2, TO BE COMPLETED!
{{dpf lt n|-5}}
{{dpf lt n|1}}
{{dpf lt n|7}}
{{dpf lt n|15}} 3, TO BE COMPLETED!
{{dpf lt n|27}} 3, TO BE COMPLETED!
{{dpf lt n|30}} 2,3,5, TO BE COMPLETED!
{{dpf lt n|111}} 3, TO BE COMPLETED!
{{dpf lt n|89*113}} 89, TO BE COMPLETED!
{{dpf lt n|5*7*13*29}} 5,7,13,29, TO BE COMPLETED!
{{dpf lt n|5*7*13*29|;}} 5;7;13;29; TO BE COMPLETED!
{{dpf lt n|5*7*13*29|sep = , }} 5, 7, 13, 29,  TO BE COMPLETED!

Examples with invalid input

code result
{{dpf lt n|0}} Distinct nontrivial prime factors error: Argument must be a nonzero integer
{{dpf lt n|131^2}} Distinct nontrivial prime factors error: Argument must be a nonzero integer with absolute value < 131 2 = 17161

Formatted numbers

This template requires unformatted numbers, it will not recognize formatted numbers, e.g. comma separated, which is by design since formatted numbers will break expression parsers. To remove the formatting from a number, you can wrap the number first in {{formatnum:number|R}}.[1]

code result
{{distinct nontrivial prime factors|1,000}} Distinct nontrivial prime factors error: Argument must be a nonzero integer
{{distinct nontrivial prime factors|{{formatnum:1,000|R}}}} 2,5, TO BE COMPLETED!

Code



See also







External links


Notes