Determine the summation of the reciprocals of numbers with length equal to N,in the meanwhile there is a digit K excluded from the numbers.
reference:( http://en.wikipedia.org/wiki/Kempner_series )
For example:
if N = 2 and K = 7
the matrix are as following:
10 20 30 40 50 60 80 90
11 21 31 41 51 61 81 91
12 22 32 42 52 62 82 92
13 23 33 43 53 63 83 93
14 24 34 44 54 64 84 94
15 25 35 45 55 65 85 95
16 26 36 46 56 66 86 96
18 28 38 48 58 68 88 98
19 29 39 49 59 69 89 99ouput then can be the summation of the reciprocals of above matrix
output = 2.01554407485017
So, give the input N and K, determine the output as mentioned above
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers15
Suggested Problems
-
Make the vector [1 2 3 4 5 6 7 8 9 10]
53668 Solvers
-
Find the peak 3n+1 sequence value
2572 Solvers
-
1798 Solvers
-
Arrange vector in ascending order
836 Solvers
-
Given a matrix, swap the 2nd & 3rd columns
1284 Solvers
More from this Author1
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
An interesting follow-up problem would be multi-digit values for K.