Digital root/Multiplicative digital root: Difference between revisions

Convert to task, tidy up presentation of task description
m (→‎{{header|Tcl}}: more informative variable names)
(Convert to task, tidy up presentation of task description)
Line 1:
{{draft task|Mathematics}}
The [[wp:Multiplicative digital root|multiplicative digital root]] (MDR) and multiplicative persistence (MP) of a number, (N)<math>n</math>, is calculated rather like the [[Digital root]] except digits are multiplied instead of being added:
:*# Set MDR<math>m</math> to N<math>n</math> and MP<math>i</math> to <math>0</math>.
:*# While MDR<math>m</math> has more than one digit:
::#* Find a replacement MDR<math>m</math> as the multiplication of the digits of the current MDRvalue of <math>m</math>.
::#* Increment MP<math>i</math>.
:*# Return <math>i</math> (= MP) and <math>m</math> (= MDR)
 
;Task:
Anonymous user