Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,27 @@
ClearAll[MakeLengthFive, MayanNumeral]
MakeLengthFive[ci_String] := Module[{c},
c = If[EvenQ[StringLength[ci]], ci <> " ", ci];
While[StringLength[c] < 5, c = " " <> c <> " "];
c
]
MayanNumeral[n_Integer?Positive] := Module[{nums, q, r, c},
nums = IntegerDigits[n, 20];
Row[Table[
{q, r} = QuotientRemainder[m, 5];
If[{q, r} =!= {0, 0},
c = Prepend[ConstantArray["-----", q], StringJoin[ConstantArray[".", r]]];
c = Join[ConstantArray["", 4 - Length[c]], c];
c
,
c = {"", "", "", "\[Theta]"}
];
Column[MakeLengthFive /@ c, Frame -> True]
,
{m, nums}
], Spacer[1]]
]
MayanNumeral[4005]
MayanNumeral[8017]
MayanNumeral[326205]
MayanNumeral[886205]
MayanNumeral[1337]