
Last chance! 50% off unlimited learning
Sale ends in
This function calculates PDI, defined as the sum of a number's digits raised to a given power.
pdi(x, pwr = 2, base = 10)
The PDI of the input value and base, as a bigz
integer.
The bigz
integer to start with.
The power to which digits are raised. Default is 2.
The base of the source integer. Note that calculations within this function are performed in base 10. Default is 10.
Carl Witthoft, carl@witthoft.com
This is a helper function for dontWorry
. Use at your own risk.