public static int NumberOfPrimeUnder(int number)
        {
            int result = 0;

            for (int i = 2; i <= number; i++)
            {
                if (FunctionsMath.IsPrime(i))
                {
                    result++;
                }
            }

            return(result);
        }
        public static List <int> GetPrimesBefore(int number)
        {
            List <int> result = new List <int>
            {
                2
            };

            for (int i = 3; i <= number; i = i + 2)
            {
                if (FunctionsMath.IsPrime(i))
                {
                    result.Add(i);
                }
            }

            return(result);
        }
        public static Dictionary <int, int> NumberOfPrimesByHundred(int number)
        {
            Dictionary <int, int> result = new Dictionary <int, int>();

            for (int i = 2; i <= number; i++)
            {
                if (FunctionsMath.IsPrime(i))
                {
                    int index = (Math.Abs(i / 100) + 1) * 100;
                    if (result.ContainsKey(index))
                    {
                        result[index]++;
                    }
                    else
                    {
                        result.Add(index, 1);
                    }
                }
            }

            return(result);
        }
 public static bool IsTwinPrime(int number)
 {
     return(FunctionsMath.IsPrime(number) && FunctionsMath.IsPrime(number + 2));
 }