login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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
1, 3, 5, 8, 1204, 1205, 1199, 1191, 19536395, 19536233, 19535912, 19535673, 19519159 (list; graph; refs; listen; history; text; internal format)
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.

LINKS

Table of n, a(n) for n=0..12.

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

Cf. A004207, A272233.

Sequence in context: A109342 A121371 A067094 * A058642 A258086 A141251

Adjacent sequences:  A272232 A272233 A272234 * A272236 A272237 A272238

KEYWORD

nonn,base,more

AUTHOR

Anthony Sand, Apr 23 2016

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 12 10:54 EDT 2021. Contains 344947 sequences. (Running on oeis4.)