Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,15 @@
#!/usr/bin/env bash
numbers=(627615 39390 588225 393900588225 55)
declare root
for number in "${numbers[@]}"; do
declare -i iterations
root="${number}"
while [[ "${#root}" -ne 1 ]]; do
root="$(( $(fold -w1 <<<"${root}" | xargs | sed 's/ /+/g') ))"
iterations+=1
done
echo -e "${number} has additive persistence ${iterations} and digital root ${root}"
unset iterations
done | column -t