Function to return the sum of elements in an array having composite frequency
static int sumOfElements ( int [ ] arr , int n ) { List < Boolean > composite = new List < Boolean > ( ) ; for ( int i = 0 ; i < N ; i ++ ) composite . Add ( false ) ; SieveOfEratosthenes ( composite ) ;