# Mathematics and P5

**URL:** https://discourse.processing.org/t/mathematics-and-p5/11019
**Category:** Teaching
**Created:** [May 7, 2019, 11:45pm UTC](https://discourse.processing.org/t/mathematics-and-p5/11019 "2019-05-07T23:45:16Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![gbenedisgrab](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@gbenedisgrab](https://discourse.processing.org/u/gbenedisgrab)
#### Post date: [May 7, 2019, 11:45pm UTC](https://discourse.processing.org/t/mathematics-and-p5/11019/1 "2019-05-07T23:45:16Z")

</div>

I am interested in exploring how p5 can be used in math courses k-12. I recently was in a HS math course discussing this problem:

Which natural number from 1…N has the most factors. We started by creating a simple n^2 approach to the solution and realized its limitations. The next day I showed them the n log n approach animated in the sketch below. They were excited. As N grows in size you need different approaches. One of the students is trying to code a greedy solution of prime factorizations. I think this could lead to finding solutions with N as high as n^100. I am posting this link to start a conversation about what people have found to work in using computing to engage mathematical thinking. Also I would love to collaborate with people who want to work on figuring out where p5 fits into mathematics education.

Best,

Greg Benedis-Grab

[https://editor.p5js.org/gbenedisgrab/sketches/mhDYoWVCP](https://editor.p5js.org/gbenedisgrab/sketches/mhDYoWVCP)

---

<div class="post-metadata">

### Author: ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)
#### Post date: [May 8, 2019, 9:34pm UTC](https://discourse.processing.org/t/mathematics-and-p5/11019/2 "2019-05-08T21:34:19Z")

</div>

Seen that

> [@P5 Math in Motion – GSoC Proposal](https://discourse.processing.org/t/p5-math-in-motion-gsoc-proposal/10072):
>
> Hi Everyone, This is @Alexandra and @Oskar. We are a team from NYC, and this is our GSoC Project Proposal. Below is the link to our project github page, we hope that you find it interesting, and we would love to hear your thoughts about it. [https://og2236.github.io/GSoP-2019/](https://og2236.github.io/GSoP-2019/) Cheers!

---

<div class="post-metadata">

### Author: ![mcintyre](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mcintyre/32/14561_2.png) [@mcintyre](https://discourse.processing.org/u/mcintyre)
#### Post date: [May 8, 2019, 11:32pm UTC](https://discourse.processing.org/t/mathematics-and-p5/11019/3 "2019-05-08T23:32:08Z")

</div>

Sounds like a great lesson @gbenedisgrab! Count me in for figuring this out.

My high school math students transitioned to p5.js a few weeks ago after starting with Scratch and a subset of the [Creative Computing Curriculum](http://scratched.gse.harvard.edu/guide/). My goals are to motivate the core curriculum, deepen their understanding, and develop a range of useful skills.

Over the last few weeks, my students have drawn [constellations](https://editor.p5js.org/mcintyre/sketches/xKiqOrCja) and simulated [rainfall](https://editor.p5js.org/mcintyre/sketches/51TCM-JiI). We’ve reviewed coordinate systems, variables, functions, domain and range, and inequalities in the process. I plan to develop projects for key topics in Algebra II this summer. @ashneel.das and I will also seed [Dynamic Learning](http://www.dynamiclearning.io/) with lessons as part of his GSoC project.

---

<div class="post-metadata">

### Author: ![gbenedisgrab](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@gbenedisgrab](https://discourse.processing.org/u/gbenedisgrab)
#### Post date: [May 9, 2019, 12:15am UTC](https://discourse.processing.org/t/mathematics-and-p5/11019/4 "2019-05-09T00:15:16Z")

</div>

Yes I am mentoring Oskar this summer. Thanks

---

<div class="post-metadata">

### Author: ![gbenedisgrab](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@gbenedisgrab](https://discourse.processing.org/u/gbenedisgrab)
#### Post date: [May 9, 2019, 12:16am UTC](https://discourse.processing.org/t/mathematics-and-p5/11019/5 "2019-05-09T00:16:42Z")

</div>

Thanks Nick. Let me know if I can be helpful. I am excited about how coding can help deepen mathematical thinking.

---

<div class="post-metadata">

### Author: ![mcintyre](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mcintyre/32/14561_2.png) [@mcintyre](https://discourse.processing.org/u/mcintyre)
#### Post date: [May 9, 2019, 11:36am UTC](https://discourse.processing.org/t/mathematics-and-p5/11019/6 "2019-05-09T11:36:42Z")

</div>

Happened to see [this post](https://avc.com/2019/05/teaching-geometry-with-javascript/) about teaching geometry with JavaScript in my news feed this morning. That screenshot looks awfully familiar 😉

---

<div class="post-metadata">

### Author: ![gbenedisgrab](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@gbenedisgrab](https://discourse.processing.org/u/gbenedisgrab)
#### Post date: [May 29, 2019, 4:58pm UTC](https://discourse.processing.org/t/mathematics-and-p5/11019/7 "2019-05-29T16:58:55Z")

</div>

I am starting to write the story of what I did with this lesson in a Google Collaboratory Page here [https://colab.research.google.com/drive/12vpIQVwRNTKDOZMCfjXft1PkluFZOrju](https://colab.research.google.com/drive/12vpIQVwRNTKDOZMCfjXft1PkluFZOrju) It includes the above animation plus another p5 animation that I did with Glitch. Happy to talk more about these ideas with anyone interested.

---

<div class="post-metadata">

### Author: ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)
#### Post date: [May 30, 2019, 12:10am UTC](https://discourse.processing.org/t/mathematics-and-p5/11019/8 "2019-05-30T00:10:36Z")

</div>

Fantastic writeup – thank you so much for sharing it.

I wasn’t familiar with [glitch.me](http://glitch.me) – still trying to understand what it is, but it looks very interesting.

---

<div class="post-metadata">

### Author: ![gbenedisgrab](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@gbenedisgrab](https://discourse.processing.org/u/gbenedisgrab)
#### Post date: [May 30, 2019, 1:58am UTC](https://discourse.processing.org/t/mathematics-and-p5/11019/9 "2019-05-30T01:58:41Z")

</div>

Thanks for the compliment @jeremydouglass Glitch is a great platform for p5. You can load it from a github repo in one click and you have access to console.
