Let ⌈x⌉ denote the smallest integer greater than or equal to x. The sequence (ai) is defined as follows: a1=1, and for all i≥1,
ai+1=min(7⌈(ai+1)/7⌉, 19⌈(ai+1)/19⌉)
Compute a100.
a(1)=1;
for i=1:99
a(i+1)=min(7*ceil((a(i)+1)/7),19*ceil((a(i)+1)/19));
end
a
As listed below, a(100) is 525.
a =
Columns 1 through 10
1 7 14 19 21 28 35 38 42 49
Columns 11 through 20
56 57 63 70 76 77 84 91 95 98
Columns 21 through 30
105 112 114 119 126 133 140 147 152 154
Columns 31 through 40
161 168 171 175 182 189 190 196 203 209
Columns 41 through 50
210 217 224 228 231 238 245 247 252 259
Columns 51 through 60
266 273 280 285 287 294 301 304 308 315
Columns 61 through 70
322 323 329 336 342 343 350 357 361 364
Columns 71 through 80
371 378 380 385 392 399 406 413 418 420
Columns 81 through 90
427 434 437 441 448 455 456 462 469 475
Columns 91 through 100
476 483 490 494 497 504 511 513 518 525
In addition to the initial 1, the remaining numbers are all the multiples of 7 and of 19 that will fit through 525.
|
Posted by Charlie
on 2024-12-10 13:33:11 |