Problem: Triangular, pentagonal, and hexagonal (adapted from Project Euler Problem 45)
Triangular, pentagonal, and hexagonal numbers are generated by the following formulae:
We can see that T(5)=H(3)=15 so 15 is both triangular and hexagonal.
We can also see that T(1) = P(1) = H(1) = 1 so 1 is triangular, pentagonal, and hexagonal.
Find the next triangular number that is also pentagonal, and hexagonal.
Support: Students will need to learn/know: if statements, functions, and while loops.
Standard addressed: F-IF2 - Use function notation, evaluate functions for inputs in their domains, and interpret statements that use function notation in terms of a context.