fix algo_naif, huge beginner mistake

    sum starts at T[j] not 0
    sum gets T[k] not T[j]