This site is supported by donations to The OEIS Foundation.

Template:Prod

From OeisWiki
Jump to: navigation, search

This template have been optimized (in the case of HTML+CSS typesetting) for Firefox,
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.

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 
n

i  = 1
i 3
after
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  = 1
  i 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 
p

p prime

p

p prime
 (1  −  p  −  s )
after

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
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
n
, defined as
n! :=
n

i  = 1
i
gives the number of permutations of
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 
p

p prime

p

p prime
1
1  −  p  −  s
after

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 prime
  
1
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) :=

n  = 1
1
ns
=
p

p prime

p

p prime
1
1  −  p  − s
, ℜ(s) > 1,
after

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) :=
n  = 1
  
1
ns
=


p
p prime
  
1
1 − p  − s
, ℜ(s) > 1.

     
ζ (s) :=
n  = 1
  
1
ns
=
p : p prime
p : p prime
  
1
1 − p  − s
, ℜ(s) > 1.

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 
p

i  = 1
q

j  = 1
r

k  = 1
ai  j  bjkcki
after

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  = 1
  
q
j  = 1
  
r
k  = 1
  ai  j  bjkcki

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

See also