All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
Power of Two Sequence (Posted on 2025-03-03) Difficulty: 2 of 5
The sequence 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 16, . . . is formed from all positive integers that are either a power of 2 or a sum of two distinct powers of 2. Find the 200th term of this sequence.

No Solution Yet Submitted by Danish Ahmed Khan    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 2
clc, clearvars
a=2.^[0:40];
b=[0 a];
[p,q] = meshgrid(a, b);
pairs = [p(:) q(:)];
s=[];
for i=1:length(pairs)
  if pairs(i,1)~=pairs(i,2)
    s(end+1)= pairs(i,1)+pairs(i,2);
  end
end
s=unique(s);
for i=1:220
  fprintf('%3d %8d\n',i,s(i))
end

The 200th element in the list of the first 220, shown below, is 524,544.
In binary it's 10000000000100000000 so it's 2^19+2^8.

  1        1
  2        2
  3        3
  4        4
  5        5
  6        6
  7        8
  8        9
  9       10
 10       12
 11       16
 12       17
 13       18
 14       20
 15       24
 16       32
 17       33
 18       34
 19       36
 20       40
 21       48
 22       64
 23       65
 24       66
 25       68
 26       72
 27       80
 28       96
 29      128
 30      129
 31      130
 32      132
 33      136
 34      144
 35      160
 36      192
 37      256
 38      257
 39      258
 40      260
 41      264
 42      272
 43      288
 44      320
 45      384
 46      512
 47      513
 48      514
 49      516
 50      520
 51      528
 52      544
 53      576
 54      640
 55      768
 56     1024
 57     1025
 58     1026
 59     1028
 60     1032
 61     1040
 62     1056
 63     1088
 64     1152
 65     1280
 66     1536
 67     2048
 68     2049
 69     2050
 70     2052
 71     2056
 72     2064
 73     2080
 74     2112
 75     2176
 76     2304
 77     2560
 78     3072
 79     4096
 80     4097
 81     4098
 82     4100
 83     4104
 84     4112
 85     4128
 86     4160
 87     4224
 88     4352
 89     4608
 90     5120
 91     6144
 92     8192
 93     8193
 94     8194
 95     8196
 96     8200
 97     8208
 98     8224
 99     8256
100     8320
101     8448
102     8704
103     9216
104    10240
105    12288
106    16384
107    16385
108    16386
109    16388
110    16392
111    16400
112    16416
113    16448
114    16512
115    16640
116    16896
117    17408
118    18432
119    20480
120    24576
121    32768
122    32769
123    32770
124    32772
125    32776
126    32784
127    32800
128    32832
129    32896
130    33024
131    33280
132    33792
133    34816
134    36864
135    40960
136    49152
137    65536
138    65537
139    65538
140    65540
141    65544
142    65552
143    65568
144    65600
145    65664
146    65792
147    66048
148    66560
149    67584
150    69632
151    73728
152    81920
153    98304
154   131072
155   131073
156   131074
157   131076
158   131080
159   131088
160   131104
161   131136
162   131200
163   131328
164   131584
165   132096
166   133120
167   135168
168   139264
169   147456
170   163840
171   196608
172   262144
173   262145
174   262146
175   262148
176   262152
177   262160
178   262176
179   262208
180   262272
181   262400
182   262656
183   263168
184   264192
185   266240
186   270336
187   278528
188   294912
189   327680
190   393216
191   524288
192   524289
193   524290
194   524292
195   524296
196   524304
197   524320
198   524352
199   524416
200   524544
201   524800
202   525312
203   526336
204   528384
205   532480
206   540672
207   557056
208   589824
209   655360
210   786432
211  1048576
212  1048577
213  1048578
214  1048580
215  1048584
216  1048592
217  1048608
218  1048640
219  1048704
220  1048832
 

  Posted by Charlie on 2025-03-03 13:18:13
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (7)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2025 by Animus Pactum Consulting. All rights reserved. Privacy Information