public SieveOfEratosthenes(int n)
	{
		a = new boolean[n + 1];
		for (int i = 1; i <= n; i++) // n iterations
			a[i] = true;

		// An iteration marks all numbers which are multiples of i as non prime
		for (int i = 2; i < n; i++)
		{
			// If a number, c, is already marked prime then its multiples are
			//  already marked prime by the factors of c earlier
			if (a[i])
				for (int j = 2; i * j <= n; j++) // n/2 + n/3 + n/5 + n/7 + n/11 + .... iterations
					a[i * j] = false; // non-linear access
		}
	}