Function to check whether the given number is Perfect Digital Invariant number or not
function isPerfectDigitalInvariant ( x ) { for ( var fixed_power = 1 ; ; fixed_power ++ ) { var temp = x , sum = 0 ;