Data update

This commit is contained in:
Ingy döt Net 2026-04-30 12:34:36 -04:00
parent 4bb20c9b71
commit cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions

View file

@ -0,0 +1,31 @@
function New-ThueMorse ( $Digits )
{
# Start with seed 0
$ThueMorse = "0"
# Decrement digits remaining
$Digits--
# While we still have digits to calculate...
While ( $Digits -gt 0 )
{
# Number of digits we'll get this loop (what we still need up to the maximum available), corrected to 0 base
$LastDigit = [math]::Min( $ThueMorse.Length, $Digits ) - 1
# Loop through each digit
ForEach ( $i in 0..$LastDigit )
{
# Append the twos complement
$ThueMorse += ( 1 - $ThueMorse.Substring( $i, 1 ) )
}
# Calculate the number of digits still remaining
$Digits = $Digits - $LastDigit - 1
}
return $ThueMorse
}
New-ThueMorse 5
New-ThueMorse 16
New-ThueMorse 73