login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A272235
In base 2, number of steps before n1(i) = n2(i) when n1(i) = n1(i-1) + digsum(n2(i-1)), n2(i) = n2(i-1) + digsum(n1(i-1)) and n1(1) = 2^(n-1), n2(1) = 0
1
1, 3, 5, 8, 1204, 1205, 1199, 1191, 19536395, 19536233, 19535912, 19535673, 19519159
OFFSET
0,2
COMMENTS
The sequence takes two different binary 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 = 2^(n-1) and n2 = 0.
FORMULA
n1(i) = n1(i-1) + digsum(n2(i-1),base=2), n2(i) = n2(i-1) + digsum(n1(i-1),base=2)
EXAMPLE
In base 2: 1000 > 0, 1000 > 1, 1001 > 10, 1010 > 100, 1011 > 110, 11111 > 1100, 10001 > 10000, 10010 = 10010
In base 10: 8 > 0, 8 > 1, 9 > 2, 10 > 4, 11 > 6, 13 > 9, 15 > 12, 17 > 16, 18 = 18
PROG
(PARI) digsum(num) = d=digits(num, 2); return(sum(i=1, #d, d[i]));
doubledigsum() = b=2; nnx=5; for(n=1, amx, n1=b^(n-1); n2=0; c=0; until(n1==n2, s1=digsum(n1); s2=digsum(n2); n1+=s2; n2+=s1; c++); print1(c, ", "); );
CROSSREFS
Sequence in context: A109342 A121371 A067094 * A058642 A258086 A141251
KEYWORD
nonn,base,more
AUTHOR
Anthony Sand, Apr 23 2016
STATUS
approved