Cody

Solution 1917866

Submitted on 1 Sep 2019
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Fail
base=4;nstart=2;nend=6;y_correct=62; assert(isequal(sum_distinct_powers(base,nstart,nend),y_correct))

s = 0 r = [] s = 3 2 2 1 1 0

Output argument "y" (and maybe others) not assigned during call to "sum_distinct_powers". Error in Test1 (line 2) assert(isequal(sum_distinct_powers(base,nstart,nend),y_correct))

2   Fail
base=5;nstart=1;nend=1000;y_correct=1193853250; assert(isequal(sum_distinct_powers(base,nstart,nend),y_correct))

s = 0 r = [] s = Columns 1 through 30 500 499 499 498 498 497 497 496 496 495 495 494 494 493 493 492 492 491 491 490 490 489 489 488 488 487 487 486 486 485 Columns 31 through 60 485 484 484 483 483 482 482 481 481 480 480 479 479 478 478 477 477 476 476 475 475 474 474 473 473 472 472 471 471 470 Columns 61 through 90 470 469 469 468 468 467 467 466 466 465 465 464 464 463 463 462 462 461 461 460 460 459 459 458 458 457 457 456 456 455 Columns 91 through 120 455 454 454 453 453 452 452 451 451 450 450 449 449 448 448 447 447 446 446 445 445 444 444 443 443 442 442 441 441 440 Columns 121 through 150 440 439 439 438 438 437 437 436 436 435 435 434 434 433 433 432 432 431 431 430 430 429 429 428 428 427 427 426 426 425 Columns 151 through 180 425 424 424 423 423 422 422 421 421 420 420 419 419 418 418 417 417 416 416 415 415 414 414 413 413 412 412 411 411 410 Columns 181 through 210 410 409 409 408 408 407 407 406 406 405 405 404 404 403 403 402 402 401 401 400 400 399 399 398 398 397 397 396 396 395 Columns 211 through 240 395 394 394 393 393 392 392 391 391 390 390 389 389 388 388 387 387 386 386 385 385 384 384 383 383 382 382 381 381 380 Columns 241 through 270 380 379 379 378 378 377 377 376 376 375 375 374 374 373 373 372 372 371 371 370 370 369 369 368 368 367 367 366 366 365 Columns 271 through 300 365 364 364 363 363 362 362 361 361 360 360 359 359 358 358 357 357 356 356 355 355 354 354 353 353 352 352 351 351 350 Columns 301 through 330 350 349 349 348 348 347 347 346 346 345 345 344 344 343 343 342 342 341 341 340 340 339 339 338 338 337 337 336 336 335 Columns 331 through 360 335 334 334 333 333 332 332 331 331 330 330 329 329 328 328 327 327 326 326 325 325 324 324 323 323 322 322 321 321 320 Columns 361 through 390 320 319 319 318 318 317 317 316 316 315 315 314 314 313 313 312 312 311 311 310 310 309 309 308 308 307 307 306 306 305 Columns 391 through 420 305 304 304 303 303 302 302 301 301 300 300 299 299 298 298 297 297 296 296 295 295 294 294 293 293 292 292 291 291 290 Columns 421 through 450 290 289 289 288 288 287 287 286 286 285 285 284 284 283 283 282 282 281 281 280 280 279 279 278 278 277 277 276 276 275 Columns 451 through 480 275 274 274 273 273 272 272 271 271 270 270 269 269 268 268 267 267 266 266 265 265 264 264 263 263 262 262 261 261 260 Columns 481 through 510 260 259 259 258 258 257 257 256 256 255 255 254 254 253 253 252 252 251 251 250 250 249 249 248 248 247 247 246 246 245 Columns 511 through 540 245 244 244 243 243 242 242 241 241 240 240 239 239 238 238 237 237 236 236 235 235 234 234 233 233 232 232 231 231 230 Columns 541 through 570 230 229 229 228 228 227 227 226 226 225 225 224 224 223 223 222 222 221 221 220 220 219 219 218 218 217 217 216 216 215 Columns 571 through 600 215 214 214 213 213 212 212 211 211 210 210 209 209 208 208 207 207 206 206 205 205 204 204 203 203 202 202 201 201 200 Columns 601 through 630 200 199 199 198 198 197 197 196 196 195 195 194 194 193 193 192 192 191 191 190 190 189 189 188 188 187 187 186 186 185 Columns 631 through 660 185 184 184 183 183 182 182 181 181 180 180 179 179 178 178 177 177 176 176 175 175 174 174 173 173 172 172 171 171 170 Columns 661 through 690 170 169 169 168 168 167 167 166 166 165 165 164 164 163 163 162 162 161 161 160 160 159 159 158 158 157 157 156 156 155 Columns 691 through 720 155 154 154 153 153 152 152 151 151 150 150 149 149 148 148 147 147 146 146 145 145 144 144 143 143 142 142 141 141 140 Columns 721 through 750 140 139 139 138 138 137 137 136 136 135 135 134 134 133 133 132 132 131 131 130 130 129 129 128 128 127 127 126 126 125 Columns 751 through 780 125 124 124 123 123 122 122 121 121 120 120 119 119 118 118 117 117 116 116 115 115 114 114 113 113 112 112 111 111 110 Columns 781 through 810 110 109 109 108 108 107 107 106 106 105 105 104 104 103 103 102 102 101 101 100 100 99 99 98 98 97 97 96 96 95 Columns 811 through 840 95 94 94 93 93 92 92 91 91 90 90 89 89 88 88 87 87 86 86 85 85 84 84 83 83 82 82 81 81 80 Columns 841 through 870 80 79 79 78 78 77 77 76 76 75 75 74 74 73 73 72 72 71 71 70 70 69 69 68 68 67 67 66 66 65 Columns 871 through 900 65 64 64 63 63 62 62 61 61 60 60 59 59 58 58 57 57 56 56 55 55 54 54 53 53 52 52 51 51 50 Columns 901 through 930 50 49 49 48 48 47 47 46 46 45 45 44 44 43 43 42 42 41 41 40 40 39 39 38 38 37 37 36 36 35 Columns 931 through 960 35 34 34 33 33 32 32 31 31 30 30 29 29 28 28 27 27 26 26 25 25 24 24 23 23 22 22 21 21 20 Columns 961 through 990 20 19 19 18 18 17 17 16 16 15 15 14 14 13 13 12 12 11 11 10 10 9 9 8 8 7 7 6 6 5 Columns 991 through 1000 5 4 4 3 3 2 2 1 1 0

Output argument "y" (and maybe others) not assigned during call to "sum_distinct_powers". Error in Test2 (line 2) assert(isequal(sum_distinct_powers(base,nstart,nend),y_correct))

3   Fail
base=3;nstart=1;nend=1000;y_correct=14438162; assert(isequal(sum_distinct_powers(base,nstart,nend),y_correct))

s = 0 r = [] s = Columns 1 through 30 500 499 499 498 498 497 497 496 496 495 495 494 494 493 493 492 492 491 491 490 490 489 489 488 488 487 487 486 486 485 Columns 31 through 60 485 484 484 483 483 482 482 481 481 480 480 479 479 478 478 477 477 476 476 475 475 474 474 473 473 472 472 471 471 470 Columns 61 through 90 470 469 469 468 468 467 467 466 466 465 465 464 464 463 463 462 462 461 461 460 460 459 459 458 458 457 457 456 456 455 Columns 91 through 120 455 454 454 453 453 452 452 451 451 450 450 449 449 448 448 447 447 446 446 445 445 444 444 443 443 442 442 441 441 440 Columns 121 through 150 440 439 439 438 438 437 437 436 436 435 435 434 434 433 433 432 432 431 431 430 430 429 429 428 428 427 427 426 426 425 Columns 151 through 180 425 424 424 423 423 422 422 421 421 420 420 419 419 418 418 417 417 416 416 415 415 414 414 413 413 412 412 411 411 410 Columns 181 through 210 410 409 409 408 408 407 407 406 406 405 405 404 404 403 403 402 402 401 401 400 400 399 399 398 398 397 397 396 396 395 Columns 211 through 240 395 394 394 393 393 392 392 391 391 390 390 389 389 388 388 387 387 386 386 385 385 384 384 383 383 382 382 381 381 380 Columns 241 through 270 380 379 379 378 378 377 377 376 376 375 375 374 374 373 373 372 372 371 371 370 370 369 369 368 368 367 367 366 366 365 Columns 271 through 300 365 364 364 363 363 362 362 361 361 360 360 359 359 358 358 357 357 356 356 355 355 354 354 353 353 352 352 351 351 350 Columns 301 through 330 350 349 349 348 348 347 347 346 346 345 345 344 344 343 343 342 342 341 341 340 340 339 339 338 338 337 337 336 336 335 Columns 331 through 360 335 334 334 333 333 332 332 331 331 330 330 329 329 328 328 327 327 326 326 325 325 324 324 323 323 322 322 321 321 320 Columns 361 through 390 320 319 319 318 318 317 317 316 316 315 315 314 314 313 313 312 312 311 311 310 310 309 309 308 308 307 307 306 306 305 Columns 391 through 420 305 304 304 303 303 302 302 301 301 300 300 299 299 298 298 297 297 296 296 295 295 294 294 293 293 292 292 291 291 290 Columns 421 through 450 290 289 289 288 288 287 287 286 286 285 285 284 284 283 283 282 282 281 281 280 280 279 279 278 278 277 277 276 276 275 Columns 451 through 480 275 274 274 273 273 272 272 271 271 270 270 269 269 268 268 267 267 266 266 265 265 264 264 263 263 262 262 261 261 260 Columns 481 through 510 260 259 259 258 258 257 257 256 256 255 255 254 254 253 253 252 252 251 251 250 250 249 249 248 248 247 247 246 246 245 Columns 511 through 540 245 244 244 243 243 242 242 241 241 240 240 239 239 238 238 237 237 236 236 235 235 234 234 233 233 232 232 231 231 230 Columns 541 through 570 230 229 229 228 228 227 227 226 226 225 225 224 224 223 223 222 222 221 221 220 220 219 219 218 218 217 217 216 216 215 Columns 571 through 600 215 214 214 213 213 212 212 211 211 210 210 209 209 208 208 207 207 206 206 205 205 204 204 203 203 202 202 201 201 200 Columns 601 through 630 200 199 199 198 198 197 197 196 196 195 195 194 194 193 193 192 192 191 191 190 190 189 189 188 188 187 187 186 186 185 Columns 631 through 660 185 184 184 183 183 182 182 181 181 180 180 179 179 178 178 177 177 176 176 175 175 174 174 173 173 172 172 171 171 170 Columns 661 through 690 170 169 169 168 168 167 167 166 166 165 165 164 164 163 163 162 162 161 161 160 160 159 159 158 158 157 157 156 156 155 Columns 691 through 720 155 154 154 153 153 152 152 151 151 150 150 149 149 148 148 147 147 146 146 145 145 144 144 143 143 142 142 141 141 140 Columns 721 through 750 140 139 139 138 138 137 137 136 136 135 135 134 134 133 133 132 132 131 131 130 130 129 129 128 128 127 127 126 126 125 Columns 751 through 780 125 124 124 123 123 122 122 121 121 120 120 119 119 118 118 117 117 116 116 115 115 114 114 113 113 112 112 111 111 110 Columns 781 through 810 110 109 109 108 108 107 107 106 106 105 105 104 104 103 103 102 102 101 101 100 100 99 99 98 98 97 97 96 96 95 Columns 811 through 840 95 94 94 93 93 92 92 91 91 90 90 89 89 88 88 87 87 86 86 85 85 84 84 83 83 82 82 81 81 80 Columns 841 through 870 80 79 79 78 78 77 77 76 76 75 75 74 74 73 73 72 72 71 71 70 70 69 69 68 68 67 67 66 66 65 Columns 871 through 900 65 64 64 63 63 62 62 61 61 60 60 59 59 58 58 57 57 56 56 55 55 54 54 53 53 52 52 51 51 50 Columns 901 through 930 50 49 49 48 48 47 47 46 46 45 45 44 44 43 43 42 42 41 41 40 40 39 39 38 38 37 37 36 36 35 Columns 931 through 960 35 34 34 33 33 32 32 31 31 30 30 29 29 28 28 27 27 26 26 25 25 24 24 23 23 22 22 21 21 20 Columns 961 through 990 20 19 19 18 18 17 17 16 16 15 15 14 14 13 13 12 12 11 11 10 10 9 9 8 8 7 7 6 6 5 Columns 991 through 1000 5 4 4 3 3 2 2 1 1 0

Output argument "y" (and maybe others) not assigned during call to "sum_distinct_powers". Error in Test3 (line 2) assert(isequal(sum_distinct_powers(base,nstart,nend),y_correct))

4   Fail
base=3;nstart=100;nend=1000;y_correct=14397354; assert(isequal(sum_distinct_powers(base,nstart,nend),y_correct))

s = 0 r = [] s = Columns 1 through 30 500 499 499 498 498 497 497 496 496 495 495 494 494 493 493 492 492 491 491 490 490 489 489 488 488 487 487 486 486 485 Columns 31 through 60 485 484 484 483 483 482 482 481 481 480 480 479 479 478 478 477 477 476 476 475 475 474 474 473 473 472 472 471 471 470 Columns 61 through 90 470 469 469 468 468 467 467 466 466 465 465 464 464 463 463 462 462 461 461 460 460 459 459 458 458 457 457 456 456 455 Columns 91 through 120 455 454 454 453 453 452 452 451 451 450 450 449 449 448 448 447 447 446 446 445 445 444 444 443 443 442 442 441 441 440 Columns 121 through 150 440 439 439 438 438 437 437 436 436 435 435 434 434 433 433 432 432 431 431 430 430 429 429 428 428 427 427 426 426 425 Columns 151 through 180 425 424 424 423 423 422 422 421 421 420 420 419 419 418 418 417 417 416 416 415 415 414 414 413 413 412 412 411 411 410 Columns 181 through 210 410 409 409 408 408 407 407 406 406 405 405 404 404 403 403 402 402 401 401 400 400 399 399 398 398 397 397 396 396 395 Columns 211 through 240 395 394 394 393 393 392 392 391 391 390 390 389 389 388 388 387 387 386 386 385 385 384 384 383 383 382 382 381 381 380 Columns 241 through 270 380 379 379 378 378 377 377 376 376 375 375 374 374 373 373 372 372 371 371 370 370 369 369 368 368 367 367 366 366 365 Columns 271 through 300 365 364 364 363 363 362 362 361 361 360 360 359 359 358 358 357 357 356 356 355 355 354 354 353 353 352 352 351 351 350 Columns 301 through 330 350 349 349 348 348 347 347 346 346 345 345 344 344 343 343 342 342 341 341 340 340 339 339 338 338 337 337 336 336 335 Columns 331 through 360 335 334 334 333 333 332 332 331 331 330 330 329 329 328 328 327 327 326 326 325 325 324 324 323 323 322 322 321 321 320 Columns 361 through 390 320 319 319 318 318 317 317 316 316 315 315 314 314 313 313 312 312 311 311 310 310 309 309 308 308 307 307 306 306 305 Columns 391 through 420 305 304 304 303 303 302 302 301 301 300 300 299 299 298 298 297 297 296 296 295 295 294 294 293 293 292 292 291 291 290 Columns 421 through 450 290 289 289 288 288 287 287 286 286 285 285 284 284 283 283 282 282 281 281 280 280 279 279 278 278 277 277 276 276 275 Columns 451 through 480 275 274 274 273 273 272 272 271 271 270 270 269 269 268 268 267 267 266 266 265 265 264 264 263 263 262 262 261 261 260 Columns 481 through 510 260 259 259 258 258 257 257 256 256 255 255 254 254 253 253 252 252 251 251 250 250 249 249 248 248 247 247 246 246 245 Columns 511 through 540 245 244 244 243 243 242 242 241 241 240 240 239 239 238 238 237 237 236 236 235 235 234 234 233 233 232 232 231 231 230 Columns 541 through 570 230 229 229 228 228 227 227 226 226 225 225 224 224 223 223 222 222 221 221 220 220 219 219 218 218 217 217 216 216 215 Columns 571 through 600 215 214 214 213 213 212 212 211 211 210 210 209 209 208 208 207 207 206 206 205 205 204 204 203 203 202 202 201 201 200 Columns 601 through 630 200 199 199 198 198 197 197 196 196 195 195 194 194 193 193 192 192 191 191 190 190 189 189 188 188 187 187 186 186 185 Columns 631 through 660 185 184 184 183 183 182 182 181 181 180 180 179 179 178 178 177 177 176 176 175 175 174 174 173 173 172 172 171 171 170 Columns 661 through 690 170 169 169 168 168 167 167 166 166 165 165 164 164 163 163 162 162 161 161 160 160 159 159 158 158 157 157 156 156 155 Columns 691 through 720 155 154 154 153 153 152 152 151 151 150 150 149 149 148 148 147 147 146 146 145 145 144 144 143 143 142 142 141 141 140 Columns 721 through 750 140 139 139 138 138 137 137 136 136 135 135 134 134 133 133 132 132 131 131 130 130 129 129 128 128 127 127 126 126 125 Columns 751 through 780 125 124 124 123 123 122 122 121 121 120 120 119 119 118 118 117 117 116 116 115 115 114 114 113 113 112 112 111 111 110 Columns 781 through 810 110 109 109 108 108 107 107 106 106 105 105 104 104 103 103 102 102 101 101 100 100 99 99 98 98 97 97 96 96 95 Columns 811 through 840 95 94 94 93 93 92 92 91 91 90 90 89 89 88 88 87 87 86 86 85 85 84 84 83 83 82 82 81 81 80 Columns 841 through 870 80 79 79 78 78 77 77 76 76 75 75 74 74 73 73 72 72 71 71 70 70 69 69 68 68 67 67 66 66 65 Columns 871 through 900 65 64 64 63 63 62 62 61 61 60 60 59 59 58 58 57 57 56 56 55 55 54 54 53 53 52 52 51 51 50 Columns 901 through 930 50 49 49 48 48 47 47 46 46 45 45 44 44 43 43 42 42 41 41 40 40 39 39 38 38 37 37 36 36 35 Columns 931 through 960 35 34 34 33 33 32 32 31 31 30 30 29 29 28 28 27 27 26 26 25 25 24 24 23 23 22 22 21 21 20 Columns 961 through 990 20 19 19 18 18 17 17 16 16 15 15 14 14 13 13 12 12 11 11 10 10 9 9 8 8 7 7 6 6 5 Columns 991 through 1000 5 4 4 3 3 2 2 1 1 0

Output argument "y" (and maybe others) not assigned during call to "sum_distinct_powers". Error in Test4 (line 2) assert(isequal(sum_distinct_powers(base,nstart,nend),y_correct))

5   Fail
base=2;nstart=1;nend=2017;y_correct=2035153; assert(isequal(sum_distinct_powers(base,nstart,nend),y_correct))

s = 0 r = [] s = Columns 1 through 15 1008 1008 1007 1007 1006 1006 1005 1005 1004 1004 1003 1003 1002 1002 1001 Columns 16 through 30 1001 1000 1000 999 999 998 998 997 997 996 996 995 995 994 994 Columns 31 through 45 993 993 992 992 991 991 990 990 989 989 988 988 987 987 986 Columns 46 through 60 986 985 985 984 984 983 983 982 982 981 981 980 980 979 979 Columns 61 through 75 978 978 977 977 976 976 975 975 974 974 973 973 972 972 971 Columns 76 through 90 971 970 970 969 969 968 968 967 967 966 966 965 965 964 964 Columns 91 through 105 963 963 962 962 961 961 960 960 959 959 958 958 957 957 956 Columns 106 through 120 956 955 955 954 954 953 953 952 952 951 951 950 950 949 949 Columns 121 through 135 948 948 947 947 946 946 945 945 944 944 943 943 942 942 941 Columns 136 through 150 941 940 940 939 939 938 938 937 937 936 936 935 935 934 934 Columns 151 through 165 933 933 932 932 931 931 930 930 929 929 928 928 927 927 926 Columns 166 through 180 926 925 925 924 924 923 923 922 922 921 921 920 920 919 919 Columns 181 through 195 918 918 917 917 916 916 915 915 914 914 913 913 912 912 911 Columns 196 through 210 911 910 910 909 909 908 908 907 907 906 906 905 905 904 904 Columns 211 through 225 903 903 902 902 901 901 900 900 899 899 898 898 897 897 896 Columns 226 through 240 896 895 895 894 894 893 893 892 892 891 891 890 890 889 889 Columns 241 through 255 888 888 887 887 886 886 885 885 884 884 883 883 882 882 881 Columns 256 through 270 881 880 880 879 879 878 878 877 877 876 876 875 875 874 874 Columns 271 through 285 873 873 872 872 871 871 870 870 869 869 868 868 867 867 866 Columns 286 through 300 866 865 865 864 864 863 863 862 862 861 861 860 860 859 859 Columns 301 through 315 858 858 857 857 856 856 855 855 854 854 853 853 852 852 851 Columns 316 through 330 851 850 850 849 849 848 848 847 847 846 846 845 845 844 844 Columns 331 through 345 843 843 842 842 841 841 840 840 839 839 838 838 837 837 836 Columns 346 through 360 836 835 835 834 834 833 833 832 832 831 831 830 830 829 829 Columns 361 through 375 828 828 827 827 826 826 825 825 824 824 823 823 822 822 821 Columns 376 through 390 821 820 820 819 819 818 818 817 817 816 816 815 815 814 814 Columns 391 through 405 813 813 812 812 811 811 810 810 809 809 808 808 807 807 806 Columns 406 through 420 806 805 805 804 804 803 803 802 802 801 801 800 800 799 799 Columns 421 through 435 798 798 797 797 796 796 795 795 794 794 793 793 792 792 791 Columns 436 through 450 791 790 790 789 789 788 788 787 787 786 786 785 785 784 784 Columns 451 through 465 783 783 782 782 781 781 780 780 779 779 778 778 777 777 776 Columns 466 through 480 776 775 775 774 774 773 773 772 772 771 771 770 770 769 769 Columns 481 through 495 768 768 767 767 766 766 765 765 764 764 763 763 762 762 761 Columns 496 through 510 761 760 760 759 759 758 758 757 757 756 756 755 755 754 754 Columns 511 through 525 753 753 752 752 751 751 750 750 749 749 748 748 747 747 746 Columns 526 through 540 746 745 745 744 744 743 743 742 742 741 741 740 740 739 739 Columns 541 through 555 738 738 737 737 736 736 735 735 734 734 733 733 732 732 731 Columns 556 through 570 731 730 730 729 729 728 728 727 727 726 726 725 725 724 724 Columns 571 through 585 723 723 722 722 721 721 720 720 719 719 718 718 717 717 716 Columns 586 through 600 716 715 715 714 714 713 713 712 712 711 711 710 710 709 709 Columns 601 through 615 708 708 707 707 706 706 705 705 704 704 703 703 702 702 701 Columns 616 through 630 701 700 700 699 699 698 698 697 697 696 696 695 695 694 694 Columns 631 through 645 693 693 692 692 691 691 690 690 689 689 688 688 687 687 686 Columns 646 through 660 686 685 685 684 684 683 683 682 682 681 681 680 680 679 679 Columns 661 through 675 678 678 677 677 676 676 675 675 674 674 673 673 672 672 671 Columns 676 through 690 671 670 670 669 669 668 668 667 667 666 666 665 665 664 664 Columns 691 through 705 663 663 662 662 661 661 660 660 659 659 658 658 657 657 656 Columns 706 through 720 656 655 655 654 654 653 653 652 652 651 6...

Output argument "y" (and maybe others) not assigned during call to "sum_distinct_powers". Error in Test5 (line 2) assert(isequal(sum_distinct_powers(base,nstart,nend),y_correct))

6   Fail
base=7;nstart=1234;nend=2345;y_correct=843569026324; assert(isequal(sum_distinct_powers(base,nstart,nend),y_correct))

s = 0 r = [] s = Columns 1 through 15 1172 1172 1171 1171 1170 1170 1169 1169 1168 1168 1167 1167 1166 1166 1165 Columns 16 through 30 1165 1164 1164 1163 1163 1162 1162 1161 1161 1160 1160 1159 1159 1158 1158 Columns 31 through 45 1157 1157 1156 1156 1155 1155 1154 1154 1153 1153 1152 1152 1151 1151 1150 Columns 46 through 60 1150 1149 1149 1148 1148 1147 1147 1146 1146 1145 1145 1144 1144 1143 1143 Columns 61 through 75 1142 1142 1141 1141 1140 1140 1139 1139 1138 1138 1137 1137 1136 1136 1135 Columns 76 through 90 1135 1134 1134 1133 1133 1132 1132 1131 1131 1130 1130 1129 1129 1128 1128 Columns 91 through 105 1127 1127 1126 1126 1125 1125 1124 1124 1123 1123 1122 1122 1121 1121 1120 Columns 106 through 120 1120 1119 1119 1118 1118 1117 1117 1116 1116 1115 1115 1114 1114 1113 1113 Columns 121 through 135 1112 1112 1111 1111 1110 1110 1109 1109 1108 1108 1107 1107 1106 1106 1105 Columns 136 through 150 1105 1104 1104 1103 1103 1102 1102 1101 1101 1100 1100 1099 1099 1098 1098 Columns 151 through 165 1097 1097 1096 1096 1095 1095 1094 1094 1093 1093 1092 1092 1091 1091 1090 Columns 166 through 180 1090 1089 1089 1088 1088 1087 1087 1086 1086 1085 1085 1084 1084 1083 1083 Columns 181 through 195 1082 1082 1081 1081 1080 1080 1079 1079 1078 1078 1077 1077 1076 1076 1075 Columns 196 through 210 1075 1074 1074 1073 1073 1072 1072 1071 1071 1070 1070 1069 1069 1068 1068 Columns 211 through 225 1067 1067 1066 1066 1065 1065 1064 1064 1063 1063 1062 1062 1061 1061 1060 Columns 226 through 240 1060 1059 1059 1058 1058 1057 1057 1056 1056 1055 1055 1054 1054 1053 1053 Columns 241 through 255 1052 1052 1051 1051 1050 1050 1049 1049 1048 1048 1047 1047 1046 1046 1045 Columns 256 through 270 1045 1044 1044 1043 1043 1042 1042 1041 1041 1040 1040 1039 1039 1038 1038 Columns 271 through 285 1037 1037 1036 1036 1035 1035 1034 1034 1033 1033 1032 1032 1031 1031 1030 Columns 286 through 300 1030 1029 1029 1028 1028 1027 1027 1026 1026 1025 1025 1024 1024 1023 1023 Columns 301 through 315 1022 1022 1021 1021 1020 1020 1019 1019 1018 1018 1017 1017 1016 1016 1015 Columns 316 through 330 1015 1014 1014 1013 1013 1012 1012 1011 1011 1010 1010 1009 1009 1008 1008 Columns 331 through 345 1007 1007 1006 1006 1005 1005 1004 1004 1003 1003 1002 1002 1001 1001 1000 Columns 346 through 360 1000 999 999 998 998 997 997 996 996 995 995 994 994 993 993 Columns 361 through 375 992 992 991 991 990 990 989 989 988 988 987 987 986 986 985 Columns 376 through 390 985 984 984 983 983 982 982 981 981 980 980 979 979 978 978 Columns 391 through 405 977 977 976 976 975 975 974 974 973 973 972 972 971 971 970 Columns 406 through 420 970 969 969 968 968 967 967 966 966 965 965 964 964 963 963 Columns 421 through 435 962 962 961 961 960 960 959 959 958 958 957 957 956 956 955 Columns 436 through 450 955 954 954 953 953 952 952 951 951 950 950 949 949 948 948 Columns 451 through 465 947 947 946 946 945 945 944 944 943 943 942 942 941 941 940 Columns 466 through 480 940 939 939 938 938 937 937 936 936 935 935 934 934 933 933 Columns 481 through 495 932 932 931 931 930 930 929 929 928 928 927 927 926 926 925 Columns 496 through 510 925 924 924 923 923 922 922 921 921 920 920 919 919 918 918 Columns 511 through 525 917 917 916 916 915 915 914 914 913 913 912 912 911 911 910 Columns 526 through 540 910 909 909 908 908 907 907 906 906 905 905 904 904 903 903 Columns 541 through 555 902 902 901 901 900 900 899 899 898 898 897 897 896 896 895 Columns 556 through 570 895 894 894 893 893 892 892 891 891 890 890 889 889 888 888 Columns 571 through 585 887 887 886 886 885 885 884 884 883 883 882 882 881 881 880 Columns 586 through 600 880 879 879 878 878 877 877 876 876 875 875 874 874 873 873 Columns 601 through 615 872 872 871 871 870 870 869 869 868 868 867 867 866 866 865 Columns 616 through 630 865 864 864 863 863 862 862 861 861 860 860 859 859 858 858 Columns 631 through 645 857 857 856 856 855 855 854 854 853 853 852 852 851 851 850 Columns 646 through 660 850 849 849 848 848 847 847 846 846 845 845 844 844 843 843 Columns 661 through 675 842 842 841 841 840 840 839 839 838 838 837 837 836 836 835 Columns 676 through 690 835 834 834 833 833 832 832 831 831 830 830 829 829 828 828 Columns 691 through 705 827 827 826 826 825 825 824 824 823 823 822 822 821 821 820 Columns 706 through 720 820 819 819 818 818 817 817 816 816 815 8...

Output argument "y" (and maybe others) not assigned during call to "sum_distinct_powers". Error in Test6 (line 2) assert(isequal(sum_distinct_powers(base,nstart,nend),y_correct))

7   Fail
base=7;nstart=1;nend=10;y_correct=1265; assert(isequal(sum_distinct_powers(base,nstart,nend),y_correct))

s = 0 r = [] s = 5 4 4 3 3 2 2 1 1 0

Output argument "y" (and maybe others) not assigned during call to "sum_distinct_powers". Error in Test7 (line 2) assert(isequal(sum_distinct_powers(base,nstart,nend),y_correct))

8   Fail
nstart=1;nend=50; junk=arrayfun(@(base) sum_distinct_powers(base,nstart,nend),2:10); y_correct=[1275 7120 26365 75000 178591 374560 714465 1266280 2116675]; assert(isequal(junk,y_correct))

s = 0 r = [] s = Columns 1 through 30 25 24 24 23 23 22 22 21 21 20 20 19 19 18 18 17 17 16 16 15 15 14 14 13 13 12 12 11 11 10 Columns 31 through 50 10 9 9 8 8 7 7 6 6 5 5 4 4 3 3 2 2 1 1 0

Output argument "y" (and maybe others) not assigned during call to "sum_distinct_powers". Error in Test8>@(base)sum_distinct_powers(base,nstart,nend) Error in Test8 (line 2) junk=arrayfun(@(base) sum_distinct_powers(base,nstart,nend),2:10);