private static bool prime_optimized(int p, NArray <int> arr) { bool c = true; for (int i = 0; i < arr.Size(); i++) { if (p % arr.Get(i) == 0) { c = false; } } return(c); }