#JavaScript (ES8), 110 bytes

<!-- language-all: lang-javascript -->

    f=(n,k=m=7**n)=>k<7*m&&/^1(4?6+)?((45?)?5)?((24?)?4)?((23?)?3)?(0?2+)?(0?1+)?0*$/.test(k.toString(7))+f(n,k+1)

[Try it online!](https://tio.run/##Zc1BD4IgGMbxe5@jufeFUkHMS8SH6N7mDJyh0IT19Qm9tU7/357L8@o/fRjW6R3Pzj91SkaCO1m5yI4Qh/Jmrx1ZiqJ6MBDqQlEBiFahajdxkSV2NVlNVq043cNyanKsyqhDBFtGf4/r5EboEKnZTijDNHgX/KzL2Y9ggCEefhf@tzSI6Qs "JavaScript (Node.js) – Try It Online")