Digital Root

Description

By Eddie Shore, January 2016 (Eddie's Math and Calculator Blog)

Define DR(n) as the digital root function:
DR(n) = n – 9 * int((n-1)/9), n > 0

DR returns the sum of n’s digits and repeats until a single digit remains.
Enter integer n and press f A. DR(n) is displayed.

Examples:
DR(4514) = 5
DR(9376) = 7
DR(636088) = 4
DR(761997) = 3

Program Resources

Labels

Name Description
 A Digital Root

Program

Line Display Key Sequence
000
001 42,21,11 f LBL A
002 36 ENTER
003 36 ENTER
004 1 1
005 30
006 9 9
007 10 ÷
008 43 44 g INT
009 9 9
010 20 ×
011 30
012 43 32 g RTN