You are given two integers L and R. You are required to find the count of all the PR numbers in the range L to R inclusively.
PR number are the numbers which satisfy following 2 properties: -
P:- No pair of adjacent digits are coprime i.e. 2 adjacent digits in a PR number will not be coprime to each other.
R:- PR number is divisible by all the single digit prime numbers which occur as a digit in the PR number.
1<=L,R<=1018
According to me between 1 and 100. These are the PR numbers
Sorry 1 is not PR number.
I think 20,30..90 should be PR number because 0 and 2 aren't coprime as gcd(0, 2) =2 and 20 is divisible by 2 which is present as a digit in 20