pdi: Calculate Perfect Digital Invariant ~~
Description
This function calculates PDI, defined as the sum of a number's digits raised to a given power.
Usage
pdi(x, pwr = 2, base = 10)
Value
The PDI of the input value and base, as a bigz
integer.
Arguments
- x
The bigz
integer to start with.
- pwr
The power to which digits are raised. Default is 2.
- base
The base of the source integer. Note that calculations within this function are performed in base 10. Default is 10.
Details
This is a helper function for dontWorry
. Use at your own risk.