OFFSET
1,2
COMMENTS
a(n) = digital root of (1+floor(n/9))*(1+((n-1) mod 9)).
Sequence is periodic, period length is 81. The 9 by 9 array of the first 81 terms is symmetric.
To determine the digital root of a product a*b by means of this sequence (or rather by means of the 9 by 9 array) reduce both a and b modulo 9 - if a result is zero replace it by 9 - to obtain c and d, then choose the d-th element of the c-th row, or alternatively the c-th element of the d-th row, i.e. A(c,d) or A(d,c); commutativity of multiplication is reflected in the symmetry of the array.
EXAMPLE
Array begins:
1 2 3 4 5 6 7 8 9
2 4 6 8 1 3 5 7 9
3 6 9 3 6 9 3 6 9
4 8 3 7 2 6 1 5 9
5 1 6 2 7 3 8 4 9
6 3 9 6 3 9 6 3 9
7 5 3 1 8 6 4 2 9
8 7 6 5 4 3 2 1 9
9 9 9 9 9 9 9 9 9
Find the digital root of 197*799
(a) customarily: digital root of 197*799 = digital root of (digital root of 197)*(digital root of 799) = digital root of 8*7 = digital root of 56 = 2.
(b) using the array: 197 mod 9 = 8, 799 mod 9 = 7; A(8,7) = A(7,8) = 2.
PROG
(PARI) {digitalroot(n) = if(n<1, 0, (n-1)%9+1)} {a(n) = digitalroot((1+floor(n/9))*(1+((n-1)%9)))} {for(n=1, 105, print1(a(n), ", "))} /* Klaus Brockhaus, Mar 28 2007 */
CROSSREFS
KEYWORD
nonn,tabf,base,easy
AUTHOR
Simon Alexander (simonalexander2005(AT)hotmail.com), Feb 07 2007
EXTENSIONS
Edited by Klaus Brockhaus, Mar 28 2007
STATUS
approved