Esempio n. 1
0
        private bool TruncRight(long num, Dictionary <long, List <long> > primes)
        {
            Boolean     flag = true;
            List <long> nums = new List <long>();
            String      nStr = num.ToString();

            for (int i = 1; i < nStr.Length; i++)
            {
                nums.Add(int.Parse(nStr.Substring(i)));
            }
            long subKey;

            foreach (long number in nums)
            {
                subKey = pg.GetKey(number, LIMIT, BLOCK_SIZE);
                if (!primes[subKey].Contains(number))
                {
                    flag = false;
                    break;
                }
            }
            return(flag);
        }