This site is supported by donations to The OEIS Foundation.
Template:Nroot/doc
The {{nroot}} mathematical formatting template and/or mathematical function template typesets either finite or infinite [generalized] nested radicals in either HTML+CSS or LaTeX, or approximates (up to 14 decimal digits) the numerical result.
Usage
For finite nested radicals, use either
-
{{nroot|r0;; m1//r1,, m2//r2,, ...,, mk//rk|format}}
or
-
{{nroot|r0;; m1//r1//i1,, m2//r2//i2,, ...,, mk//rk//ik|format}}
while for infinite nested radicals, use either (where in either case the last rk
is left blank)
-
{{nroot|r0;; m1//r1,, m2//r2,, ...,, mk//|format}}
or
-
{{nroot|r0;; m1//r1//i1,, m2//r2//i2,, ...,, mk// //ik|format}}
where
-
r0
followed by two consecutive semi-columns is the integer part; -
mj
, with 1 ≤j
≤k
≤ 8, are the “partial multipliers” (only the first eight “partial multipliers” are considered, the others are ignored); -
rj
, with 1 ≤j
≤k
≤ 8, are the “partial radicands” (only the first eight “partial radicands” are considered, the others are ignored); -
ij
, with 1 ≤j
≤k
≤ 8, are the “partial indices” (only the first eight “partial indices” are considered, the others are ignored);
and where format
is from (currently, lowercase or uppercase gives the same result)
-
htm
: HTML+CSS, -
HTM
: HTML+CSS, -
tex
: LaTeX, -
TEX
: LaTeX, or -
#
: numerical result (up to 14 decimal digits) of nested radical (up to the last providedrk
,k
≤ 8).
Notes:
- If the last
rk
is empty, the nested radicals are considered infinite, otherwise considered finite; - “partial multipliers” equal to
1
are automatically blanked (append a null space, e.g.1{{sp|0}}
to force 1 to appear); - “partial radicands” equal to
0
(as well as the+
sign that would have followed) are automatically blanked (append a null space, e.g.0{{sp|0}}
to force 0 followed by a + sign to appear).
Examples
The code
: {{math|? {{=|sp}} {{nroot|0;; 2//1,, 4//2,, 6//3,, 8//4,, 10//5,, 12//6,, 14//7,, 16//8|HTM}} {{=|sp}} {{nroot|0;; 2//1,, 4//2,, 6//3,, 8//4,, 10//5,, 12//6,, 14//7,, 16//8|#}}{{...|ldots}} |tex = ? = {{nroot|0;; 2//1,, 4//2,, 6//3,, 8//4,, 10//5,, 12//6,, 14//7,, 16//8|TEX}} = {{nroot|0;; 2//1,, 4//2,, 6//3,, 8//4,, 10//5,, 12//6,, 14//7,, 16//8|#}}\ldots |&&}}
yields the display style HTML+CSS (Check 14 digits: 0 + 2 * sqrt(1 + 4 * sqrt(2 + 6 * sqrt(3 + 8 * sqrt(4 + 10 * sqrt(5 + 12 * sqrt(6 + 14 * sqrt(7 + 16 * sqrt(8)))))))) = 11.258138412482039...
)
-
? = 2 √ 1 + 4 √ 2 + 6 √ 3 + 8 √ 4 + 10 √ 5 + 12 √ 6 + 14 √ 7 + 16 √ 8 = 11.258138412482…
The code
: {{math|? {{=|sp}} {{nroot|0;; 2//1,, 4//2,, 6//3,, 8//4,, 10//5,, 12//6,, 14//7,, 16//8|HTM}} {{=|sp}} {{nroot|0;; 2//1,, 4//2,, 6//3,, 8//4,, 10//5,, 12//6,, 14//7,, 16//8|#}}{{...|ldots}} |tex = ? = {{nroot|0;; 2//1,, 4//2,, 6//3,, 8//4,, 10//5,, 12//6,, 14//7,, 16//8|TEX}} = {{nroot|0;; 2//1,, 4//2,, 6//3,, 8//4,, 10//5,, 12//6,, 14//7,, 16//8|#}}\ldots |$$}}
yields the display style LaTeX (Check 14 digits: 0 + 2 * sqrt(1 + 4 * sqrt(2 + 6 * sqrt(3 + 8 * sqrt(4 + 10 * sqrt(5 + 12 * sqrt(6 + 14 * sqrt(7 + 16 * sqrt(8)))))))) = 11.258138412482039...
)
The code
: {{math|? {{=|sp}} {{nroot|0;; 2//1,, 4//2,, 6//3,, 8//4,, 10//5,, 12//6,, 14//7,, 16//|HTM}} |tex = ? = {{nroot|0;; 2//1,, 4//2,, 6//3,, 8//4,, 10//5,, 12//6,, 14//7,, 16//|TEX}} |&&}}
yields the display style HTML+CSS
-
? = 2 √ 1 + 4 √ 2 + 6 √ 3 + 8 √ 4 + 10 √ 5 + 12 √ 6 + 14 √ 7 + 16 √ ⋯
The code
: {{math|? {{=|sp}} {{nroot|0;; 2//1,, 4//2,, 6//3,, 8//4,, 10//5,, 12//6,, 14//7,, 16//|HTM}} |tex = ? = {{nroot|0;; 2//1,, 4//2,, 6//3,, 8//4,, 10//5,, 12//6,, 14//7,, 16//|TEX}} |$$}}
yields the display style LaTeX
The code
: {{math|? {{=|sp}} {{nroot|0;; 2//1,, 4//2,, 6//3,, 8//4|HTM}} |tex = ? = {{nroot|0;; 2//1,, 4//2,, 6//3,, 8//4|TEX}} |&&}}
yields the display style HTML+CSS
-
? = 2 √ 1 + 4 √ 2 + 6 √ 3 + 8 √ 4
The code
: {{math|? {{=|sp}} {{nroot|0;; 2//1,, 4//2,, 6//3,, 8//4|HTM}} |tex = ? = {{nroot|0;; 2//1,, 4//2,, 6//3,, 8//4|TEX}} |$$}}
yields the display style LaTeX
The code
: {{math|? {{=|sp}} {{nroot|;; 2//1,, 4//2,, 6//3,, 8//|HTM}} |tex = ? = {{nroot|;; 2//1,, 4//2,, 6//3,, 8//|TEX}} |&&}}
yields the display style HTML+CSS
-
? = 2 √ 1 + 4 √ 2 + 6 √ 3 + 8 √ ⋯
The code
: {{math|? {{=|sp}} {{nroot|;; 2//1,, 4//2,, 6//3,, 8//|HTM}} |tex = ? = {{nroot|;; 2//1,, 4//2,, 6//3,, 8//|TEX}} |$$}}
yields the display style LaTeX
The code
: {{math|? {{=|sp}} {{nroot|0;; ''x''//1,, ''x''{{^|2}}//2,, ''x''{{^|3}}//3,, ''x''{{^|4}}//4,, ''x''{{^|5}}//5,, <!-- -->''x''{{^|6}}//6,, ''x''{{^|7}}//7,, ''x''{{^|8}}//|HTM}} |tex = ? = {{nroot|0;; ''x''//1,, ''x''{{^|2|tex}}//2,, ''x''{{^|3|tex}}//3,, ''x''{{^|4|tex}}//4,, ''x''{{^|5|tex}}//5,, <!-- -->''x''{{^|6|tex}}//6,, ''x''{{^|7|tex}}//7,, ''x''{{^|8|tex}}//|TEX}} |&&}}
yields the display style HTML+CSS
-
? = x √ 1 + x 2 √ 2 + x 3 √ 3 + x 4 √ 4 + x 5 √ 5 + x 6 √ 6 + x 7 √ 7 + x 8 √ ⋯
The code
: {{math|? {{=|sp}} {{nroot|0;; ''x''//1,, ''x''{{^|2}}//2,, ''x''{{^|3}}//3,, ''x''{{^|4}}//4,, ''x''{{^|5}}//5,, <!-- -->''x''{{^|6}}//6,, ''x''{{^|7}}//7,, ''x''{{^|8}}//|HTM}} |tex = ? = {{nroot|0;; ''x''//1,, ''x''{{^|2|tex}}//2,, ''x''{{^|3|tex}}//3,, ''x''{{^|4|tex}}//4,, ''x''{{^|5|tex}}//5,, <!-- -->''x''{{^|6|tex}}//6,, ''x''{{^|7|tex}}//7,, ''x''{{^|8|tex}}//|TEX}} |$$}}
yields the display style LaTeX
The code
: {{math|? {{=|sp}} {{nroot|0;; ''x''//1,, ''x''{{^|2}}//2,, ''x''{{^|3}}//3,, ''x''{{^|4}}//|HTM}} |tex = ? = {{nroot|0;; ''x''//1,, ''x''{{^|2|tex}}//2,, ''x''{{^|3|tex}}//3,, ''x''{{^|4|tex}}//|TEX}} |&&}}
yields the display style HTML+CSS
-
? = x √ 1 + x 2 √ 2 + x 3 √ 3 + x 4 √ ⋯
The code
: {{math|? {{=|sp}} {{nroot|0;; ''x''//1,, ''x''{{^|2}}//2,, ''x''{{^|3}}//3,, ''x''{{^|4}}//|HTM}} |tex = ? = {{nroot|0;; ''x''//1,, ''x''{{^|2|tex}}//2,, ''x''{{^|3|tex}}//3,, ''x''{{^|4|tex}}//|TEX}} |$$}}
yields the display style LaTeX
Examples with root indices
The code
: {{math|? {{=|sp}} {{nroot|{{op|-}}1;; 2//1//2,, 4//2//3,, 6//3//4,, 8//4//5,, 10//5//6,, 12//6//7,, 14//7//8,, 16// //9|HTM}} {{=|sp}} <!-- -->{{nroot|{{op|-}}1;; 2//1//2,, 4//2//3,, 6//3//4,, 8//4//5,, 10//5//6,, 12//6//7,, 14//7//8,, 16// //9|#}}{{...|ldots}} |tex = ? = {{nroot|{{op|-}}1;; 2//1//2,, 4//2//3,, 6//3//4,, 8//4//5,, 10//5//6,, 12//6//7,, 14//7//8,, 16// //9|TEX}} = <!-- -->{{nroot|{{op|-}}1;; 2//1//2,, 4//2//3,, 6//3//4,, 8//4//5,, 10//5//6,, 12//6//7,, 14//7//8,, 16// //9|#}}\ldots |&&}}
yields the display style HTML+CSS (Check 14 digits: -1 + 2 * ( 1 + 4 * ( 2 + 6 * ( 3 + 8 * ( 4 + 10 * ( 5 + 12 * ( 6 + 14 * ( 7 )^(1/8))^(1/7))^(1/6))^(1/5))^(1/4))^(1/3))^(1/2) = 5.5454104248858983...
)
-
? = −1 + 2 2√ 1 + 4 3√ 2 + 6 4√ 3 + 8 5√ 4 + 10 6√ 5 + 12 7√ 6 + 14 8√ 7 + 16 9√ ⋯= 5.5454104248859…
The code
: {{math|? {{=|sp}} {{nroot|{{op|-}}1;; 2//1//2,, 4//2//3,, 6//3//4,, 8//4//5,, 10//5//6,, 12//6//7,, 14//7//8,, 16// //9|HTM}} {{=|sp}} <!-- -->{{nroot|{{op|-}}1;; 2//1//2,, 4//2//3,, 6//3//4,, 8//4//5,, 10//5//6,, 12//6//7,, 14//7//8,, 16// //9|#}}{{...|ldots}} |tex = ? = {{nroot|{{op|-}}1;; 2//1//2,, 4//2//3,, 6//3//4,, 8//4//5,, 10//5//6,, 12//6//7,, 14//7//8,, 16// //9|TEX}} = <!-- -->{{nroot|{{op|-}}1;; 2//1//2,, 4//2//3,, 6//3//4,, 8//4//5,, 10//5//6,, 12//6//7,, 14//7//8,, 16// //9|#}}\ldots |$$}}
yields the display style LaTeX (Check 14 digits: -1 + 2 * ( 1 + 4 * ( 2 + 6 * ( 3 + 8 * ( 4 + 10 * ( 5 + 12 * ( 6 + 14 * ( 7 )^(1/8))^(1/7))^(1/6))^(1/5))^(1/4))^(1/3))^(1/2) = 5.5454104248858983...
)
Mathematical examples
See: mathematical examples.
See also
- {{cfrac}} (typesets either finite or infinite [generalized] continued fractions in either HTML+CSS or LaTeX) (particular case of finite or infinite [generalized] nested radicals with root indices all equal to − 1)