Consecutive Prime Sum

Is it a O(N^2) approach??