Digital Root

Author

Eric W. Weisstein
June 1, 2003

This notebook downloaded from http://mathworld.wolfram.com/notebooks/NumberTheory/DigitalRoot.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/DigitalRoot.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Code

DigitalRoot[n_Integer?Positive]:=FixedPoint[Plus@@IntegerDigits[#]&,n]

Enumeration

Table[DigitalRoot[n],{n,20}]

Table[If[(m=Mod[n,9])==0,9,m],{n,20}]

Table[Mod[n-1,9]+1,{n,20}]

Plot

<<Plot`

IntegerListPlot[Table[DigitalRoot[n],{n,50}],
AxesLabel->TraditionalForm/@{n,dr[n]}]