This site is supported by donations to The OEIS Foundation.
Template:Prod/doc
though with some compromises to obtain [more or less] acceptable results with MS Internet Explorer (or now MS Edge) and Google Chrome.
The {{prod}} (product operator) mathematical formatting template is used to obtain an HTML+CSS or a LaTeX formatted product expression.
Contents
Usage
- {{prod|from|to}} (followed by multiplicand, as with LaTeX; format defaults to
htm
)
or
- {{prod|from|to|format}} (followed by multiplicand, as with LaTeX)
or
- {{prod|from|to|multiplicand}}
or
- {{prod|from|to|multiplicand|format}}
where format is one of the following:
-
htm
: HTML+CSS markup (text style, with postscript limits) for product expression (default); -
HTM
: HTML+CSS markup (display style, with underscript/overscript limits) for product expression; -
tex
: LaTeX markup (text style, with postscript limits) for product expression; -
TEX
: LaTeX markup (display style, with underscript/overscript limits) for product expression.
Examples
The code
-
: line of text above{{nl}}another line of text above{{nl}}before {{math|{{prod|''i''{{=}}1|''n''|''i''{{^|3}}}}|&}} after{{nl}}line of text below{{nl}}another line of text below
yields the text style HTML+CSS
- line of text above
another line of text above
before
after∏ ni = 1i 3
line of text below
another line of text below
The code
-
: line of text above{{nl}}another line of text above{{nl}}before {{math|{{prod|''i''{{=}}1|''n''|''i''{{^|3|tex}}|tex}}|$}} after{{nl}}line of text below{{nl}}another line of text below
yields the text style LaTeX
- line of text above
another line of text above
before after
line of text below
another line of text below
The code
-
{{math|{{prod|''i''{{=}}1|''n''|''i''{{^|3|HTM}}|HTM}}|&&}}
yields the display style HTML+CSS
- n
∏ i = 1i 3
The code
-
{{math|{{prod|''i''{{=}}1|''n''|''i''{{^|3|TEX}}|TEX}}|$$}}
yields the display style LaTeX
The code
-
before {{math|{{prod|''p''{{nl}}''p'' prime|<!-- upper -->|(1 {{op|-}} ''p''{{^|{{op|-}}{{sp|1}}''s''}}{{sp|1}})}}|&}} after
yields the text style HTML+CSS
- before
after∏ p
p prime(1 − p − s )
The code
-
before {{math|{{prod|\stackrel{p}{ p {\rm ~prime} }|<!-- upper -->|(1 \,-\, p^{- s})|tex}}|$}} after
yields the text style LaTeX
- before after
The code
-
{{math|{{prod|''p''{{nl}}''p'' prime|<!-- upper -->|(1 {{op|-}} ''p''{{^|{{op|-}}{{sp|1}}''s''}}{{sp|1}})|HTM}}|&&}}
yields the display style HTML+CSS
∏ p
p prime(1 − p − s )
The code
-
{{math|{{prod|\stackrel{p}{ p {\rm ~prime} }|<!-- upper -->|(1 - p^{- s})|TEX}}|$$}}
yields the display style LaTeX
The code
: The factorial of {{math|''n''|tex = n|&}}, defined as <!-- -->{{math|''n''! {{sym|def}} {{prod|''i''{{=}}1|''n''|''i''}} |tex = n! := \prod_{i=1}^{n} i |&}} gives the number of permutations of {{math|''n''|tex = n|&}}.
yields the text style HTML+CSS
- The factorial of
, defined asn
gives the number of permutations ofn! := ∏ ni = 1i
.n
and, with the $
argument, yields the text style LaTeX
- The factorial of , defined as gives the number of permutations of .
Examples with fraction
The code
: before {{math|<!-- -->{{prod|''p''{{nl}}''p'' prime|<!-- upper --><!-- -->|{{frac|1|1 {{op|-}} ''p''{{^|{{op|-}}{{sp|1}}''s''}}|htm}}<!-- -->}}|&}} after
yields the text style HTML+CSS
- before
after∏ p
p prime1 1 − p − s
The code
: before {{math|{{prod|\stackrel{p}{ p {\rm ~prime} }|<!-- upper -->|{{frac|1|1 - ''p''{{^|- ''s''|tex}}|tex}}|tex}}|$}} after
yields the text style LaTeX
- before after
The code
: {{math|<!-- -->{{prod|''p''{{nl}}''p'' prime|{{nl|2}}<!-- upper --> |{{frac|1|1 {{op|-}} ''p''{{^|{{op|-}}{{sp|1}}''s''}}|HTM}}<!-- -->|HTM}} |&&}}
yields the display style HTML+CSS
∏ p
p prime1 1 − p − s
The code
: {{math|{{prod|\stackrel{p}{ p {\rm ~prime} }|<!-- upper -->|\frac{1}{ 1 - p^{- s} }|TEX}}|$$}}
yields the display style LaTeX
Examples with equality
The code
{{indent}}before {{math| ''{{Gr|zeta}}''{{sp|1}}(''s'') {{sym|def}} <!-- -->{{sum|''n''{{=}}1|infty | {{frac|1|''n''{{^|''s''}}|htm}} }}<!-- --> {{=}} <!-- -->{{prod|''p''{{nl}}''p'' prime|<!-- upper --> | {{frac|1|1 {{op|-}} ''p''{{^|{{op|-}}''s''}}|htm}} }},{{sp|quad}}{{sym|real}}(''s'') > 1,<!-- --> |&}} after
yields the text style HTML+CSS
beforeζ (s) :=
|
The code
before {{math|''{{Gr|zeta|tex}}''(''s'') \,{{sym|def|tex}}\, <!-- -->{{sum|''n''{{=}}1|infty | {{frac|1|''n''{{^|''s''|TEX}}|TEX}}<!-- -->|TEX}} {{=}} <!-- -->{{prod|\stackrel{p}{ p {\rm ~prime} }|<!-- upper -->|{{frac|1|1 - ''p''{{^|- ''s''|tex}}|tex}}|tex}},{{sp|quad|tex}}{{sym|real|tex}}(''s'') > 1,<!-- --> |$}} after
yields the text style LaTeX
- before after
The code
{{indent}}{{math|''{{Gr|zeta}}''{{sp|1}}(''s'') {{sym|def}} <!-- -->{{sum|''n''{{=}}1|infty | {{frac|1|''n''{{^|''s''}}|HTM}} |HTM}}<!-- --> {{=}} <!-- -->{{prod|''p''{{nl}}''p'' prime|{{nl|2}}<!-- upper --> | {{frac|1|1 {{op|-}} ''p''{{^|{{op|-}}''s''}}|HTM}} |HTM}},{{sp|quad}}{{sym|real}}(''s'') > 1. |&&}}{{nl}} {{indent}}{{math|''{{Gr|zeta}}''{{sp|1}}(''s'') {{sym|def}} <!-- -->{{sum|''n''{{=}}1|infty | {{frac|1|''n''{{^|''s''}}|HTM}} |HTM}}<!-- --> {{=}} <!-- -->{{prod|''p'' : ''p'' prime|<!-- upper --> | {{frac|1|1 {{op|-}} ''p''{{^|{{op|-}}''s''}}|HTM}} |HTM}},{{sp|quad}}{{sym|real}}(''s'') > 1. |&&}}
yields the display style HTML+CSS
ζ (s) :=
|
ζ (s) :=
|
while the code
{{math|''{{Gr|zeta|tex}}''(''s'') {{sym|def|tex}} <!-- -->{{sum|''n''{{=}}1|infty | {{frac|1|''n''{{^|''s''|TEX}}|TEX}}<!-- -->|TEX}} {{=}} <!-- -->{{prod|\stackrel{p}{ p {\rm ~prime} }|<!-- upper -->|{{frac|1|1 - ''p''{{^|- ''s''|TEX}}|TEX}}|TEX}},{{sp|quad|TEX}}{{sym|real|TEX}}(''s'') > 1.<!-- --> |$$}}
yields the display style LaTeX
Examples with nested products
The code
before {{math|<!-- -->{{sum|''i''{{=}}1|''p''<!-- -->|{{prod|''j''{{=}}1|''q''<!-- -->|{{prod|''k''{{=}}1|''r''<!-- -->|''a''{{sub|''i''{{sp|2}}''j''}}{{sp|2}}''b''{{sub|''j''{{sp|1}}''k''}}{{sp|3}}''c''{{sub|''k''{{sp|1}}''i''}}<!-- -->|htm}}<!-- -->|htm}}<!-- -->|htm}}<!-- --> |&}} after
yields the text style HTML+CSS
- before
after∑ pi = 1∏ qj = 1∏ rk = 1ai j bj k ck i
while the code
before {{math|<!-- -->{{sum|''i''{{=}}1|''p''<!-- -->|{{prod|''j''{{=}}1|''q''<!-- -->|{{prod|''k''{{=}}1|''r''<!-- -->|''a''{{sub|''ij''|tex}}{{sp|2|tex}}''b''{{sub|''jk''|tex}}{{sp|3|tex}}''c''{{sub|''ki''|tex}}<!-- -->|tex}}<!-- -->|tex}}<!-- -->|tex}}<!-- --> |$}} after
yields the text style LaTeX
- before after
The code
{{math|<!-- -->{{sum|''i''{{=}}1|''p''<!-- -->|{{prod|''j''{{=}}1|''q''<!-- -->|{{prod|''k''{{=}}1|''r''<!-- -->|''a''{{sub|''i''{{sp|2}}''j''}}{{sp|2}}''b''{{sub|''j''{{sp|1}}''k''}}{{sp|3}}''c''{{sub|''k''{{sp|1}}''i''}}<!-- -->|HTM}}<!-- -->|HTM}}<!-- -->|HTM}}<!-- --> |&&}}
yields the display style HTML+CSS
- p
∑ i = 1q∏ j = 1r∏ k = 1ai j bj k ck i
while the code
{{math|<!-- -->{{sum|''i''{{=}}1|''p''<!-- -->|{{prod|''j''{{=}}1|''q''<!-- -->|{{prod|''k''{{=}}1|''r''<!-- -->|''a''{{sub|''ij''|TEX}}{{sp|2|TEX}}''b''{{sub|''jk''|TEX}}{{sp|3|TEX}}''c''{{sub|''ki''|TEX}}<!-- -->|TEX}}<!-- -->|TEX}}<!-- -->|TEX}}<!-- --> |$$}}
yields the display style LaTeX