# Product of primes

**URL:** <https://cl.desmos.com/t/product-of-primes/3795>\
**Category:** Questions\
**Tags:** patterns\
**Created:** [November 4, 2021, 1:37pm UTC](https://cl.desmos.com/t/product-of-primes/3795 "2021-11-04T13:37:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tarnold](https://avatars.discourse-cdn.com/v4/letter/t/c5a1d2/32.png) [@tarnold](https://cl.desmos.com/u/tarnold)\
**Post date:** [November 4, 2021, 1:37pm UTC](https://cl.desmos.com/t/product-of-primes/3795/1 "2021-11-04T13:37:29Z")

</div>

I’m setting some questions on expressing a number as a product of primes. I’m just a bit stuck on a method of checking the various allowable answers. eg: 2_2_2_3_5 or 2^3_3_5 etc.

Has anyone done this in an activity?

---

<div class="post-metadata">

**Author:** ![tarnold](https://avatars.discourse-cdn.com/v4/letter/t/c5a1d2/32.png) [@tarnold](https://cl.desmos.com/u/tarnold)\
**Post date:** [November 6, 2021, 11:30am UTC](https://cl.desmos.com/t/product-of-primes/3795/2 "2021-11-06T11:30:23Z")

</div>

I was thinking of just writing some code to test whether the input has 2 factors but I’m not sure how to get the input. I could just put a table in and check each cell in the table ? Is there a way to take comma separated values or something?

---

<div class="post-metadata">

**Author:** ![cwinske](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/cwinske/32/3106_2.png) [@cwinske](https://cl.desmos.com/u/cwinske)\
**Post date:** [November 6, 2021, 2:34pm UTC](https://cl.desmos.com/t/product-of-primes/3795/3 "2021-11-06T14:34:34Z")

</div>

If you want to list the factors as a product, I think using a pattern match would work well.

If you want factors separated with a comma, I would suggest using countNumberUsage.
