OFFSET
0,2
COMMENTS
The sequence takes two different numbers, n1 and n2, and simultaneously adds the digit sum of n1 to n2 and the digit sum of n2 to n1. This process continues until n1 = n2. The two numbers are initialized with n1 = 10^(n-1) and n2 = 0.
a(5) > 10^12. - Lars Blomberg, Jul 19 2017
FORMULA
n1(i) = n1(i-1) + digsum(n2(i-1)), n2(i) = n2(i-1) + digsum(n1(i-1))
EXAMPLE
10 > 0, 10 > 1, 11 > 2, 13 > 4, 17 > 8, 25 > 16, 32 > 23, 37 > 28, 47 > 38, 58 > 49, 71 > 62, 79 > 70, 86 = 86
PROG
(PARI) {digsum(num) = d=digits(num, b); return(sum(i=1, #d, d[i])); } {doubledigsum() = b=10; nmx=5; for(n=1, nmx, n1=b^(a-1); n2=0; c=0; until(n1==n2, s1=digsum(n1); s2=digsum(n2); n1+=s2; n2+=s1; c++); print1(c, ", "); ); }
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Anthony Sand, Apr 23 2016
STATUS
approved