Cody

# Problem 250. Project Euler: Problem 10, Sum of Primes

Solution 1933585

Submitted on 12 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
x = 2000000; y_correct = 142913828922; assert(isequal(euler010(x),y_correct))

ox = 2 ox = 2 3 ox = 2 3 5 ox = 2 3 5 7 ox = 2 3 5 7 11 ox = 2 3 5 7 11 13 ox = 2 3 5 7 11 13 17 ox = 2 3 5 7 11 13 17 19 ox = 2 3 5 7 11 13 17 19 23 ox = 2 3 5 7 11 13 17 19 23 29 ox = 2 3 5 7 11 13 17 19 23 29 31 ox = 2 3 5 7 11 13 17 19 23 29 31 37 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Column 31 127 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 32 127 131 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 33 127 131 137 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 34 127 131 137 139 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 35 127 131 137 139 149 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 36 127 131 137 139 149 151 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 37 127 131 137 139 149 151 157 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 38 127 131 137 139 149 151 157 163 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 39 127 131 137 139 149 151 157 163 167 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 40 127 131 137 139 149 151 157 163 167 173 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 41 127 131 137 139 149 151 157 163 167 173 179 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 42 127 131 137 139 149 151 157 163 167 173 179 181 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 43 127 131 137 139 149 151 157 163 167 173 179 181 191 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 44 127 131 137 139 149 151 157 163 167 173 179 181 191 193 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 45 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 46 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 47 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 48 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 49 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 50 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 51 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 233 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 52 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 233 239 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 ...

Undefined function or variable 'y'. Error in euler010 (line 17) sum(array) = y Error in Test1 (line 3) assert(isequal(euler010(x),y_correct))

2   Fail
x = 10; y_correct = 17; assert(isequal(euler010(x),y_correct))

ox = 2 ox = 2 3 ox = 2 3 5 ox = 2 3 5 7 ox = 2 3 5 7 11 ox = 2 3 5 7 11 13 ox = 2 3 5 7 11 13 17 ox = 2 3 5 7 11 13 17 19 ox = 2 3 5 7 11 13 17 19 23 ox = 2 3 5 7 11 13 17 19 23 29 ox = 2 3 5 7 11 13 17 19 23 29 31 ox = 2 3 5 7 11 13 17 19 23 29 31 37 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Column 31 127 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 32 127 131 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 33 127 131 137 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 34 127 131 137 139 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 35 127 131 137 139 149 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 36 127 131 137 139 149 151 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 37 127 131 137 139 149 151 157 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 38 127 131 137 139 149 151 157 163 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 39 127 131 137 139 149 151 157 163 167 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 40 127 131 137 139 149 151 157 163 167 173 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 41 127 131 137 139 149 151 157 163 167 173 179 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 42 127 131 137 139 149 151 157 163 167 173 179 181 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 43 127 131 137 139 149 151 157 163 167 173 179 181 191 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 44 127 131 137 139 149 151 157 163 167 173 179 181 191 193 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 45 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 46 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 47 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 48 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 49 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 50 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 51 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 233 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 52 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 233 239 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 ...

Undefined function or variable 'y'. Error in euler010 (line 17) sum(array) = y Error in Test2 (line 3) assert(isequal(euler010(x),y_correct))

3   Fail
x = 200; y_correct =4227; assert(isequal(euler010(x),y_correct))

ox = 2 ox = 2 3 ox = 2 3 5 ox = 2 3 5 7 ox = 2 3 5 7 11 ox = 2 3 5 7 11 13 ox = 2 3 5 7 11 13 17 ox = 2 3 5 7 11 13 17 19 ox = 2 3 5 7 11 13 17 19 23 ox = 2 3 5 7 11 13 17 19 23 29 ox = 2 3 5 7 11 13 17 19 23 29 31 ox = 2 3 5 7 11 13 17 19 23 29 31 37 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Column 31 127 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 32 127 131 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 33 127 131 137 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 34 127 131 137 139 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 35 127 131 137 139 149 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 36 127 131 137 139 149 151 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 37 127 131 137 139 149 151 157 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 38 127 131 137 139 149 151 157 163 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 39 127 131 137 139 149 151 157 163 167 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 40 127 131 137 139 149 151 157 163 167 173 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 41 127 131 137 139 149 151 157 163 167 173 179 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 42 127 131 137 139 149 151 157 163 167 173 179 181 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 43 127 131 137 139 149 151 157 163 167 173 179 181 191 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 44 127 131 137 139 149 151 157 163 167 173 179 181 191 193 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 45 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 46 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 47 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 48 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 49 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 50 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 51 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 233 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 52 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 233 239 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 ...

Undefined function or variable 'y'. Error in euler010 (line 17) sum(array) = y Error in Test3 (line 3) assert(isequal(euler010(x),y_correct))

4   Fail
x = 11; y_correct = 28; assert(isequal(euler010(x),y_correct))

ox = 2 ox = 2 3 ox = 2 3 5 ox = 2 3 5 7 ox = 2 3 5 7 11 ox = 2 3 5 7 11 13 ox = 2 3 5 7 11 13 17 ox = 2 3 5 7 11 13 17 19 ox = 2 3 5 7 11 13 17 19 23 ox = 2 3 5 7 11 13 17 19 23 29 ox = 2 3 5 7 11 13 17 19 23 29 31 ox = 2 3 5 7 11 13 17 19 23 29 31 37 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 ox = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Column 31 127 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 32 127 131 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 33 127 131 137 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 34 127 131 137 139 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 35 127 131 137 139 149 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 36 127 131 137 139 149 151 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 37 127 131 137 139 149 151 157 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 38 127 131 137 139 149 151 157 163 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 39 127 131 137 139 149 151 157 163 167 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 40 127 131 137 139 149 151 157 163 167 173 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 41 127 131 137 139 149 151 157 163 167 173 179 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 42 127 131 137 139 149 151 157 163 167 173 179 181 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 43 127 131 137 139 149 151 157 163 167 173 179 181 191 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 44 127 131 137 139 149 151 157 163 167 173 179 181 191 193 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 45 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 46 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 47 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 48 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 49 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 50 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 51 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 233 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 52 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 233 239 ox = Columns 1 through 30 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 ...

Undefined function or variable 'y'. Error in euler010 (line 17) sum(array) = y Error in Test4 (line 3) assert(isequal(euler010(x),y_correct))