Esempio n. 1
0
        public void CircularPrimes()
        {
            Assert.IsTrue(Atkin.IsCircularPrime(197));
            Assert.IsTrue(Atkin.IsCircularPrime(719));
            Assert.IsTrue(Atkin.IsCircularPrime(971));
            List <int> liCircs = new List <int>(new int[] { 2, 3, 5, 7, 11, 13, 17, 31, 37, 71, 73, 79, 97 });

            for (int i = 1; i < 100; i++)
            {
                Assert.AreEqual(liCircs.Contains(i), Atkin.IsCircularPrime(i));
            }
        }