login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

%I #12 Apr 29 2016 09:25:20

%S 1,3,5,8,1204,1205,1199,1191,19536395,19536233,19535912,19535673,

%T 19519159

%N 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

%C 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.

%F n1(i) = n1(i-1) + digsum(n2(i-1),base=2), n2(i) = n2(i-1) + digsum(n1(i-1),base=2)

%e In base 2: 1000 > 0, 1000 > 1, 1001 > 10, 1010 > 100, 1011 > 110, 11111 > 1100, 10001 > 10000, 10010 = 10010

%e In base 10: 8 > 0, 8 > 1, 9 > 2, 10 > 4, 11 > 6, 13 > 9, 15 > 12, 17 > 16, 18 = 18

%o (PARI) digsum(num) = d=digits(num,2); return(sum(i=1,#d,d[i]));

%o 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,", "); );

%Y Cf. A004207, A272233.

%K nonn,base,more

%O 0,2

%A _Anthony Sand_, Apr 23 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)