Hi, maybe some of you guys know Project Euler already, if not, please follow the link and read a bit about it. It is a collection of interesting mathematical problems. This is my take on the first problem:
Find the sum of all the multiples of 3 or 5 below 1000
While this is a one line problem in python:
print(sum([0 if i % 3 and i % 5 else i in range(1000)]))
solving this analytically is challenging.
This is how far I got:
W mj i,j ki,kj−maximal value, here 1000=⌊logjW⌋−exponents, here 3,5∈N;exponents for i,j;kx<=mx
wherefore iki⋅jkj<W is always valid.
As log is a strict monotonic function, we can change this to
iki⋅jkj ki⋅logi(i)+kj⋅logi(j) ki mi(j)<W<logi(W)<logi(W)−kj⋅logi(j)=⌊logi(W)−kj⋅logi(j)⌋
So the needed value can be defined as:
L =a=0∑mjb=0∑mi(a)ja⋅ib=a=0∑mjja⋅b=0∑mi(a)ib
Now, apply this summation formula:
i=0∑nki=k−1kn+1−1
which results in
L =a=0∑mjja⋅i−1imi(a)+1−1=i−1−1⋅a=0∑mjja+i−1i⋅a=0∑mjja⋅imi(a)=i−1−1⋅(j−1jmj+1−1)+i−1i⋅a=0∑mjia⋅logi(j)+mi(a)
well... and this is how far I got. I could reformulate it to:
L=i−1−1⋅(j−1jmj+1−1)+i−1i⋅W⋅a=0∑mji−{logi(W)−a⋅logi(j)}
with $ \{ \} $ as the frac function. I have no idea how to proceed from here. :(
So if you see an error or have an idea, please write me!
I also found a different solution here: Muvik.de but I really like to know how to solve my problem!