Power of 3

find the highest power of 3 in 100!

48 45 52 50

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Arulx Z
Nov 3, 2015

The formula for counting 3s is expressed as

i = 1 k 100 3 i \sum _{ i=1 }^{ k }{ \left\lfloor \frac { 100 }{ { 3 }^{ i } } \right\rfloor }

we normally stop when the floor function returns zero.

100 3 + 100 9 + 100 27 + 100 81 \left\lfloor \frac { 100 }{ 3 } \right\rfloor +\left\lfloor \frac { 100 }{ 9 } \right\rfloor +\left\lfloor \frac { 100 }{ 27 } \right\rfloor +\left\lfloor \frac { 100 }{ 81 } \right\rfloor

Anything ahead of 81 will return 0. Hence the sum is 48.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...