Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,19 +0,0 @@
|
|||
function Get-DigitalRoot ($n)
|
||||
{
|
||||
function Get-Digitalsum ($n)
|
||||
{
|
||||
if ($n -lt 10) {$n}
|
||||
else {
|
||||
($n % 10) + (Get-DigitalSum ([math]::Floor($n / 10)))
|
||||
}
|
||||
}
|
||||
|
||||
$ap = 0
|
||||
do {$n = Get-DigitalSum $n; $ap++}
|
||||
until ($n -lt 10)
|
||||
$DigitalRoot = [pscustomobject]@{
|
||||
'Sum' = $n
|
||||
'Additive Persistence' = $ap
|
||||
}
|
||||
$DigitalRoot
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
function Get-DigitalRoot {
|
||||
param($n)
|
||||
$ap = 0
|
||||
do {$n = Invoke-Expression ("0"+([string]$n -split "" -join "+")+"0"); $ap++} while ($n -ge 10)
|
||||
[PSCustomObject]@{
|
||||
DigitalRoot = $n
|
||||
AdditivePersistence = $ap
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue