# Coding Stories: Exploring Factors

Jun 2 · 12 min read

`Look at each number { 1,2,3,4,5.... n }For each of the above #'s look at the the #'s {1 to that numberCheck if the second number divides into the first number evenlyFor each of the first numbers report the count of even divisions (factors)`
`OUTPUT:2 has 2 factors.3 has 2 factors.4 has 3 factors.`
`for j in range(2,i//2+1)`
`Declare variables max_count=0 and max_factors=0.In the loop check if count is greater than max_countIf it is greater then store max_count and the number in max_factors.`
`OUTPUT:The following numbers in the set { 1, . . . 100 } have the most factors60 with 10 factors72 with 10 factors84 with 10 factors90 with 10 factors96 with 10 factors`

# [2,1,1]=2²⋅3¹⋅5¹=60

`OUTPUT:the prime factorization [2, 1, 1] has a value of 60the prime factorization [2, 1, 1] has 12 factorsthe prime factorization [2, 1, 1] should be written, 2^2*3^1*5^1`
`OUTPUT:840 has 32 factors pf: [3, 1, 1, 1, 0, 0, 0, 0, 0]900 has 27 factors pf: [2, 2, 2, 0, 0, 0, 0, 0, 0]720 has 30 factors pf: [4, 2, 1, 0, 0, 0, 0, 0, 0]960 has 28 factors pf: [6, 1, 1, 0, 0, 0, 0, 0, 0]864 has 24 factors pf: [5, 3, 0, 0, 0, 0, 0, 0, 0]576 has 21 factors pf: [6, 2, 0, 0, 0, 0, 0, 0, 0]768 has 18 factors pf: [8, 1, 0, 0, 0, 0, 0, 0, 0]512 has 10 factors pf: [9, 0, 0, 0, 0, 0, 0, 0, 0]`

Written by

## Greg Benedis-Grab

#### exploring the intersection of coding, education and disciplinary knowledge

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just \$5/month. Upgrade