DEV Community

Discussion on: Daily Challenge #102 - Pentabonacci

Collapse
 
erezwanderman profile image
erezwanderman

Javascript:

Pentabonacci = n => n < 2 ? n : Math.floor((n - 1) / 6) + Math.floor((n - 2) / 6) + 1