**What is your hint or solution suggestion?**

You can entirely bypass the triangular number part.

(this problem was solved entirely with math)

## Code

```
function triPentaHexa() {
var pentaNum = 166
while(true) {
let pentaNum8 = 4*pentaNum*(3*pentaNum-1)
if(Math.floor((pentaNum8+1)**.5)===(pentaNum8+1)**.5 && ((pentaNum8+1)**.5%4==3)) {
return pentaNum8/8
}
pentaNum++
}
}
triPentaHexa();
```

**Challenge:** Problem 45: Triangular, pentagonal, and hexagonal

**Link to the challenge:**