# Category Archives: Mathematical

## Prime functions in Python SymPyOctober 28, 2017

How to get prime numbers quickly in python using library functions ? Library functions always makes our code easy so here we are going to… Read More »

## Program for quotient and remainder of big number

Given a string of numbers and given another number (say m) [0

## Count Primes in RangesOctober 27, 2017

Given a range [L, R], we need to find the count of total numbers of prime numbers in the the range [L, R] where 0

## Largest power of k in n! (factorial) where k may not be prime

Given two numbers k and n, find the largest power of k that divides n! Constraints: K > 1 Examples: Input : n = 7,… Read More »

## Sum of multiples of a number up to NOctober 26, 2017

Given a number a and limit N. Find the sum of multiple of a upto N. Examples: Input : a = 4, N = 23… Read More »

## Minimum number of bombsOctober 25, 2017

There are aliens in n buildings (minimum of 1 in each) and you have to kill all of them minimum number of bombings. Buildings are… Read More »

## Queries to find whether a number has exactly four distinct factors or not

Given a positive integers ‘q’ and ‘n’. For each query ‘q’ find whether a number ‘n’ have exactly four distinct divisors or not. If the… Read More »

## Program for Derivative of a Polynomial

Given a polynomial as string and a value. Evaluate polynomial’s derivative for the given value. Note: The input format is such that there is a… Read More »

## Sgn value of a polynomial

Given a polynomial function f(x) = 1+ a1*x + a2*(x^2) + … an(x^n). Find the Sgn value of these function, when x is given and… Read More »

## First collision point of two seriesOctober 24, 2017

Given five numbers a, b, c, d and n (where a, b, c, d, n > 0). These values represent n terms of two series.… Read More »

## Bessel’s Interpolation

Interpolation is the technique of estimating the value of a function for any intermediate value of the independent variable, while the process of computing the… Read More »

## LCM of digits of a given numberOctober 23, 2017

Given a number n, find LCM of its digits. Examples: Input : 397 Output : 63 LCM of 3, 9 and 7 is 63. Input… Read More »

## Divisible by 37 for large numbers

Given a large number n, we need to check whether it is divisible by 37. Print true if it is divisible by 37 otherwise False.… Read More »

## Armstrong Numbers between two integers

A positive integer with digits a, b, c, d… is called an Armstrong number of order n if following condition is satisfied. abcd… = an… Read More »

## Lucas Primality TestOctober 22, 2017

A number p greater than one is prime if and only if the only divisors of p are 1 and p. First few prime numbers… Read More »