Tag Archives: euler-totient

Given two integers X and Y, the task is to find the number of integers, K, such that gcd(X, Y) is equal to gcd(X+K, Y),… Read More
Given an integer N, the task is to check whether the Euler’s Totient Function of N and 2 * N are the same or not.… Read More
Given three integers L, R and M, the task is to find the probability of Euler’s Totient Function of a number in the range [L,… Read More
Given a string S and an integer K, the task is to find the total number of strings that can be formed by inserting exactly… Read More
Given an integer N, the task is to find the count of all possible integers less than N satisfying the following properties: The number is… Read More
Given an array arr[] of N integers, and a range L to R, the task is to find the total number of elements in the… Read More
Given an integer N, the task is to find the sum of Greatest Common Divisors of all numbers up to N with N itself.Examples: Input:… Read More
Given a number N, the task is to find the number of pairs (a, b) in the range [1, N] such that their LCM is… Read More
Given two integers M and K, the task is to count the number of integers between [0, M] such that GCD of that integer with… Read More
A highly totient number k is an integer that has more solutions to the equation φ(x) = k, where φ is Euler’s totient function The… Read More
Given a very large number N. The task is to find (1n + 2n + 3n + 4n) mod 5. Examples: Input: N = 4… Read More
Given 2 integers L and R, the task is to find out the number of integers in the range [L, R] such that they are… Read More
Given a prime . The task is to count all the primitive roots of . A primitive root is an integer x (1 <= x… Read More
Given a number N. The task is to find the number of unordered coprime pairs of integers from 1 to N. There can be multiple… Read More
Given x, k and m. Compute (xxxx...k)%m, x is in power k times. Given x is always prime and m is greater than x. Examples:… Read More