Select Page

First non-zero digit in N!:-

i.e. the first digit which is not zero after the trailing zeros from rightmost side in N!

firstly note down this:-

 

U[6 × 0] = 0U[6 × 2] = 2U[6 × 4] = 4U[6 × 6] = 6U[6 × 8] = 8Even numbers

where ‘U𝒹’ means unit digit i.e. if we multiply 6 to any even number, we get the same even number as the unit digit of the product.

  To find the last digit of 2ᴺ
First divide N by 4 & find the remainder.
if remainder is 0 then unit digit = 6
if remainder is 1 then unit digit = (2)¹ = 2
if remainder is 2 then unit digit = (2)² = 4
if remainder is 3 then unit digit= (2)³ = 8

To find the first non-zero digit first try to understand the concept from which we will derive a simple formula:-

⇨ Find the first non-zero digit in 42!

Since we know that in any factorial number power of 2 is always greater than power of 5 & we get a trailing zero in the factorial only when a 5 is multiplied by 2, (5×2=10) & 5 will be present in every successive dividend of 5 i.e.  ⇨ 5, 10, 15, 20, 25, 30, 35, ……… So first we will try to make group of Five-Five number from this factorial. ⇨

42!= (1×2×3×4×5) × (6×7×8×9×10) × (11×12×3×4×15) × (16×17×18×19×0) × ……. × (36×37×38×9×40) × (41×42)
⇨ Here total group are 9 & if we count (41×42) as extra group then total five-five element’s group are 
\frac{{40}}{5} =8

now we can extract all 5 & the same number of 2s from this & the unit digit of the remaining product will give us the First Non Zero Digit in N!. But this will be a very typical job to do this in spite of this being a small number & when the number will become very large it will be next to impossible task to do it manually. that’s why by & by we will derive to a formula. Now again these groups can be written as:-

42!=(10 × 12) × (10 × 3024) × (10 × 36036) × (10 × 186048) × ....... × (10 × 7896096) ×( 41 × 42)first groupsecond groupthird groupfourth group8 group

this can be again written as:-

42!=(10 × 12 × 1) × (10 × 1512 × 2) × (10 × 12012 × 3) × (10 × 46512 × 4) × ....... × (10 × 987012 × 8) ×( 41 × 42)first groupsecond groupthird groupfourth group8 group

Here multiplication of 10 will count to the trailing zeros in the factorial so we can ignore it to find the last non-zero digit.
now again we can notice that in every group the number can be written as (after ignoring 10)  ⇨ a number of which last digit is 2 × group number)

So to find first non-zero digit we can write as:-

first non-zero digit of 42! =

U(2×1) × U(2×2) × U(2×3) × U(2×4) ×.......× U(2×8) ×U(2!)U of (41×42)

which equals to
U𝒹(2⁸) × U𝒹(1×2×3×4×5×6×7×8) × U𝒹(2!)

=U𝒹(2⁸) × U𝒹(8!) × 240320ignore this zerotake this one= 6×2×2= 4what we can notice in this is that

we can write directly it by:-
divide 42 by 5 which gives quotient as 8 & remainder as 2.
then write direct as
first non-zero digit of 42!
=U𝒹(2⁸) × U𝒹(8!) × U𝒹(2!)

so we can generalize a simple formula:-

To find the first non-zero digit in N! divide N by 5 & let quotient be Q & remainder be R then First Non-Zero Digit of N!=

U(2) × U(Q!) × U(R!)

now take an example:-

(Q). Find the first non-zero digit in 89!.
Solution:-
 

17 Quotient4 Remainder

∴ FNZD(89!) = U𝒹(2¹⁷) × U𝒹(17!) × U𝒹(4!)

= 2 × U(17!) × 4again apply the same recursive formulaFor this 3 Q2 R

2 × U𝒹(2³) × U𝒹(3!) × U𝒹(2!) × 4
= 2 × 8 × 6 × 2 × 4
=8 Answer

So if number is large then we need to apply this formula multiple times. this is the one way. But if you do not want to apply this formula multiple times then use the concept of successive division. which will be our second approach:-

Let highest power of 5 in N! is H & R1, R2, R3,……… are the remainders of successive division of N by 5 then

FNZD(N!)= U(2) × U(R!) × U(R!) × U(R!) ×........

we are to do successive division process untill quotient becomes zero.

Example:- Find the FNZD of 197!.

Solution:- FNZD(197!) = ?

5555Remainder197397102214RRRR

Highest power of 5 in 197! i.e. H = 39 + 7 + 1 + 0 = 47
& R₁ = 2
    R₂ = 4
    R₃ = 2
    R₄ = 1

∴ FNZD(197!) =  U𝒹(2⁴⁷) ×  U𝒹(2!) ×  U𝒹(4!) ×  U𝒹(2!) ×  U𝒹(1!)
= 8 × 2 × 4 × 2 × 1
= 8 Answer

First approach:- 
FNZD(197!) = U𝒹(2³⁹) × U𝒹(39!) × U𝒹(2!)
                       = 8 × U𝒹(39!) × 2
                       = 6 × U𝒹(39!)

Since all the factorial except of 1 (i.e. 1!) are always even numbers & so 39! will also be an even number i.e. U𝒹(39!) will also be an even number & we told earlier that 6 multiplied by even number gives the same even number so we can ignore 6 in FNZD counting when it is to be multiplied by an even number.

= U𝒹(39!)
= U𝒹(2⁷) × U𝒹(7!) × U𝒹(4!)

= 8 × U(7!) × 4

= 2 × U𝒹(7!)
= 2 × U𝒹(2¹) × U𝒹(1!) × U𝒹(2!)
= 2 × 2 × 1 × 2
= 8 Answer