Esempio n. 1
0
        public long s(long n)
        {
            if (n < 1)
            {
                return(0);
            }
            else if (n == 1)
            {
                return(1);
            }

            List <int> pPowers = PrimeTools.PrimeFactorizationPowers(n);
            long       count   = 1;

            foreach (int power in pPowers)
            {
                if (power >= 3)
                {
                    count *= (power - 1);
                }
            }

            return(count);

            //throw new NotImplementedException($"Count cube-full divisors of {n}.");
        }