Python 2, 50 bytes
f=lambda n,k=2:n/k and(f(n,k+1),n/k+f(n-1))[n%k<1]
This is slow and can't even cope with input 15 on TIO.
However, memoization (thanks @musicman523) can be used to verify all test cases.
Alternate version, 52 bytes
At the cost of 2 bytes, we can choose whether to compute f(n,k+1) or n/k+f(n-1).
f=lambda n,k=2:n>1and(n%k and f(n,k+1)or n/k+f(n-1))
With some trickery, this works for all test cases, even on TIO.
Python 2, 50 bytes
f=lambda n,k=2:n/k and(f(n,k+1),n/k+f(n-1))[n%k<1]
This is slow and can't even cope with input 15 on TIO.
Alternate version, 52 bytes
At the cost of 2 bytes, we can choose whether to compute f(n,k+1) or n/k+f(n-1).
f=lambda n,k=2:n>1and(n%k and f(n,k+1)or n/k+f(n-1))
With some trickery, this works for all test cases, even on TIO.
Python 2, 50 bytes
f=lambda n,k=2:n/k and(f(n,k+1),n/k+f(n-1))[n%k<1]
This is slow and can't even cope with input 15 on TIO.
However, memoization (thanks @musicman523) can be used to verify all test cases.
Alternate version, 52 bytes
At the cost of 2 bytes, we can choose whether to compute f(n,k+1) or n/k+f(n-1).
f=lambda n,k=2:n>1and(n%k and f(n,k+1)or n/k+f(n-1))
With some trickery, this works for all test cases, even on TIO.
Python 2, 50 bytes
f=lambda n,k=2:n/k and(f(n,k+1),n/k+f(n-1))[n%k<1]
This is slow and can't even cope with input 15 on TIO.
Alternate version, 52 bytes
Python , 52 bytes
At the cost of 2 bytes, we can choose whether to compute f(n,k+1) or n/k+f(n-1).
f=lambda n,k=2:n>1and(n%k and f(n,k+1)or n/k+f(n-1))
Works up to input 100With some trickery, this works for all test cases, even on TIO.
Python 2, 50 bytes
f=lambda n,k=2:n/k and(f(n,k+1),n/k+f(n-1))[n%k<1]
This is slow and can't even cope with input 15 on TIO.
Alternate version, 52 bytes
At the cost of 2 bytes, we can choose whether to compute f(n,k+1) or n/k+f(n-1).
f=lambda n,k=2:n>1and(n%k and f(n,k+1)or n/k+f(n-1))
With some trickery, this works for all test cases, even on TIO.
Python 2 , 50 bytes
f=lambda n,k=2:n/k and(f(n,k+1),n/k+f(n-1))[n%k<1]
This is slow and can't even cope with input 15 on TIO.
Python 3, 52 bytes
f=lambda n,k=2:n>1and(n%k and f(n,k+1)or n/k+f(n-1))
Try it online! Works up to input 100 on TIO.