Unit Digit & Number of Trailing Zerosइकाई अंक एवं अनुगामी शून्यों (Trailing Zeros) की संख्या
Compute unit digits of large exponents using 4-cyclicity and trailing zeros in factorial expansions via Legendre formula.
Overview: Unit Digit & Number of Trailing Zeros अवलोकन: इकाई अंक एवं अनुगामी शून्यों (Trailing Zeros) की संख्या
1. Unit Digit Cyclicity:
• Cyclicity 1: {0, 1, 5, 6} → Always end in 0, 1, 5, 6 respectively for any positive power.
• Cyclicity 2: {4, 9} → 4odd=4, 4even=6; 9odd=9, 9even=1.
• Cyclicity 4: {2, 3, 7, 8} → Divide power by 4; if remainder is r, evaluate digitr (if remainder is 0, evaluate digit4).
2. Trailing Zeros in N! (Legendre's Formula):
A trailing zero is created by every 2 × 5 pair. In any factorial, 2s are abundant, so the number of zeros is governed by the power of 5:
Number of Trailing Zeros = ⌊N/5⌋ + ⌊N/25⌋ + ⌊N/125⌋ + ⌊N/625⌋ + ...
Essential Formula / Rule:
Cyclicity of Unit Digits (Pattern 4) | Number of Zeros in N! = [N/5] + [N/25] + [N/125] + ...