+0  
 
+1
1704
1
avatar+368 

The number N is a multiple of 7. The base 2 representation of N is 10110101010101ABC110.

Compute the ordered triple of digits (A,B,C).

 May 26, 2019
 #1
avatar
+4

In place of ABC, you have 0s and 1s. Since they can occupy 3 spots, then you have the following possible placements:2^3 = 8 possible placements as follows:
000, 001, 010, 011, 100, 101, 110, 111. Using a short computer code to convert them, you get the following results:
B=2;a=(1,0,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,0 ); s=0;d=1;i=0; j=1; m=B^(count a-d)*a[0];s=s+m;cycle:m=B^(count a - (d+1))*a[i++];s=s+m;j++;d++; if(j


000 =  742726
001 =  742734
010 =  742742 - Only this one is a multiple of 7
011 =  742750
100 =  742758
101 =  742766
110 =  742774
111 =  742782

 May 26, 2019

2 Online Users