This site is supported by donations to The OEIS Foundation.

Template:Product of prime factors (with multiplicity)

From OeisWiki
Jump to: navigation, search

The {{product of prime factors (with multiplicity)}} (which must give the same result as {{abs|n}}) arithmetic function template returns the product of prime factors of n (with multiplicity) (absolute value) of a nonzero integer, otherwise returns an error message.

Usage

{{product of prime factors (with multiplicity)|a nonzero integer}}

must give the same result as

{{abs|a nonzero integer}}

which simply returns the absolute value, if the {{prime factors (with multiplicity)}} ({{mpf}} or {{factorization}}) arithmetic function template worked properly (which means that not only it is not buggy, but also the precious limited nesting levels of templates and/or parser functions were NOT exhausted!).

Valid input

A nonzero integer less than 1031 2 = 1062961 (validation is done by the {{mpf}} arithmetic function template).

Examples

Examples with valid input

Unfortunately, with the transclusion of {{product of prime factors (with multiplicity)/doc}} via the {{documentation}} template the precious limited nesting levels of templates and/or parser functions were exhausted! :-( Check {{product of prime factors (with multiplicity)/doc}} directly to see that all the tests are successful. Fortunately, by transcluding {{product of prime factors (with multiplicity)/doc}} directly, borrowing the minimum code needed here from the {{documentation}} template, we manage to not exhaust the limit! :-)

Code Result Comment
{{product of prime factors (with multiplicity)|210^2}} 44100
{{product of prime factors (with multiplicity)|-28}} 28
{{product of prime factors (with multiplicity)|-5}} 5
{{product of prime factors (with multiplicity)|-1}} 1 (empty product, i.e 1)
{{product of prime factors (with multiplicity)|1}} 1 (empty product, i.e 1)
{{product of prime factors (with multiplicity)|7}} 7
{{product of prime factors (with multiplicity)|15}} 15
{{product of prime factors (with multiplicity)|27}} 27
{{product of prime factors (with multiplicity)|30}} 30
{{product of prime factors (with multiplicity)|111}} 111
{{product of prime factors (with multiplicity)|5^3 * 11^2}} 15125
{{product of prime factors (with multiplicity)|2^5 * 3^3 * 5}} 4320
{{product of prime factors (with multiplicity)|2^9 * 3^3}} 13824
{{product of prime factors (with multiplicity)|37^2 + 8 * 37^2}} 12321
{{product of prime factors (with multiplicity)|2^9 * (26 + 1)}} 13824
{{product of prime factors (with multiplicity)|89 * 113}} 10057
{{product of prime factors (with multiplicity)|79 * 79}} 6241
{{product of prime factors (with multiplicity)|210^2}} 44100
{{product of prime factors (with multiplicity)|233^2}} 54289
{{product of prime factors (with multiplicity)|10000}} 10000
{{product of prime factors (with multiplicity)|65535}} 65535
{{product of prime factors (with multiplicity)|65536}} 65536
{{product of prime factors (with multiplicity)|65537}} 65537
{{product of prime factors (with multiplicity)|65539}} 65539
{{product of prime factors (with multiplicity)|65540}} 65540
{{product of prime factors (with multiplicity)|65541}} 65541
{{product of prime factors (with multiplicity)|65542}} 65542
{{product of prime factors (with multiplicity)|65543}} 65543
{{product of prime factors (with multiplicity)|65547}} 65547
{{product of prime factors (with multiplicity)|65549}} 65549
{{product of prime factors (with multiplicity)|65551}} 65551
{{product of prime factors (with multiplicity)|65553}} 65553
{{product of prime factors (with multiplicity)|65557}} 65557
{{product of prime factors (with multiplicity)|65559}} 65559
{{product of prime factors (with multiplicity)|65561}} 65561
{{product of prime factors (with multiplicity)|65563}} 65563
{{product of prime factors (with multiplicity)|65567}} 65567
{{product of prime factors (with multiplicity)|65569}} 65569
{{product of prime factors (with multiplicity)|65571}} 65571
{{product of prime factors (with multiplicity)|65573}} 65573
{{product of prime factors (with multiplicity)|65577}} 65577
{{product of prime factors (with multiplicity)|65579}} 65579
{{product of prime factors (with multiplicity)|265535}} 265535
{{product of prime factors (with multiplicity)|265536}} 265536
{{product of prime factors (with multiplicity)|265537}} 265537
{{product of prime factors (with multiplicity)|265539}} 265539
{{product of prime factors (with multiplicity)|265540}} 265540
{{product of prime factors (with multiplicity)|265541}} 265541
{{product of prime factors (with multiplicity)|265542}} 265542
{{product of prime factors (with multiplicity)|265543}} 265543
{{product of prime factors (with multiplicity)|265547}} 265547
{{product of prime factors (with multiplicity)|265549}} 265549
{{product of prime factors (with multiplicity)|265551}} 265551
{{product of prime factors (with multiplicity)|265553}} 265553
{{product of prime factors (with multiplicity)|265557}} 265557
{{product of prime factors (with multiplicity)|265559}} 265559
{{product of prime factors (with multiplicity)|265561}} 265561
{{product of prime factors (with multiplicity)|265563}} 265563
{{product of prime factors (with multiplicity)|265567}} 265567
{{product of prime factors (with multiplicity)|265569}} 265569
{{product of prime factors (with multiplicity)|265571}} 265571
{{product of prime factors (with multiplicity)|265573}} 265573
{{product of prime factors (with multiplicity)|265577}} 265577
{{product of prime factors (with multiplicity)|265579}} 265579
{{product of prime factors (with multiplicity)|257}} 257
{{product of prime factors (with multiplicity)|97 * 211}} 20467
{{product of prime factors (with multiplicity)|216 * 211}} 45576
{{product of prime factors (with multiplicity)|1024 * 45}} 46080
{{product of prime factors (with multiplicity)|97 * 257}} 24929
{{product of prime factors (with multiplicity)|3^6 * 5^2}} 18225
{{product of prime factors (with multiplicity)|3 * 5^5}} 9375
{{product of prime factors (with multiplicity)|17^2 * 191}} 55199
{{product of prime factors (with multiplicity)|5 * 7 * 13 * 29}} 13195
{{product of prime factors (with multiplicity)|509^2}} 259081
{{product of prime factors (with multiplicity)|965535}} 965535
{{product of prime factors (with multiplicity)|965536}} 965536
{{product of prime factors (with multiplicity)|965537}} 965537
{{product of prime factors (with multiplicity)|965539}} 965539
{{product of prime factors (with multiplicity)|965540}} 965540
{{product of prime factors (with multiplicity)|965541}} 965541
{{product of prime factors (with multiplicity)|965542}} 965542
{{product of prime factors (with multiplicity)|965543}} 965543
{{product of prime factors (with multiplicity)|965547}} 965547
{{product of prime factors (with multiplicity)|965549}} 965549
{{product of prime factors (with multiplicity)|965551}} 965551
{{product of prime factors (with multiplicity)|965553}} 965553
{{product of prime factors (with multiplicity)|965557}} 965557
{{product of prime factors (with multiplicity)|965559}} 965559
{{product of prime factors (with multiplicity)|965561}} 965561
{{product of prime factors (with multiplicity)|965563}} 965563
{{product of prime factors (with multiplicity)|965567}} 965567
{{product of prime factors (with multiplicity)|965569}} 965569
{{product of prime factors (with multiplicity)|965571}} 965571
{{product of prime factors (with multiplicity)|965573}} 965573
{{product of prime factors (with multiplicity)|965577}} 965577
{{product of prime factors (with multiplicity)|965579}} 965579
{{product of prime factors (with multiplicity)|1015941}} 1015941
{{product of prime factors (with multiplicity)|997 * 1019}} 1015943
{{product of prime factors (with multiplicity)|1015943}} 1015943
{{product of prime factors (with multiplicity)|1015945}} 1015945
{{product of prime factors (with multiplicity)|1015947}} 1015947
{{product of prime factors (with multiplicity)|1015949}} 1015949
{{product of prime factors (with multiplicity)|1015950}} 1015950

Examples with invalid input (argument validation by {{product of prime factors (with multiplicity)}} is omitted to spare some precious limited nesting levels of templates and/or parser functions).

Code Result
{{product of prime factors (with multiplicity)|0}} Expression error: Unrecognized word "strong".
{{product of prime factors (with multiplicity)|1031^2}} Expression error: Unrecognized word "strong".

Code


<noinclude><!-- {{documentation}} --><!-- We can't use it here, the precious limited nesting levels of templates and/or parser functions get exhausted! 

So we just borrow the necessary code from it instead.

--><div style="text-align: center; font-size: smaller;">The following [[Help:Documenting templates|documentation]] is located at [[Template:{{PAGENAME}}/doc]].</div>{{Template:{{PAGENAME}}/doc}}<!--

--></noinclude><includeonly>{{#expr: 0{{mpf| {{{1|1}}} |sep = * |key/val_sep = ^ }} + {{#ifexpr: abs ({{{1|1}}}) = 1 | 1 | 0 }} }}</includeonly>

See also







External links