# C#, 75 bytes

<!-- language-all: lang-c# -->

    n=>{int r=1,e=3-0xA000244%2;for(;n>0;e*=e){r*=(n%2>0?e:1);n>>=1;}return r;}

[A000244](https://oeis.org/A000244)

[Try it online!](https://tio.run/##VU7LagMxDLzvV@gSsPPCu82pjh1KoacWSnvo2ThaMGTlYjulZfG3b70JfXgO0kiakWTjZvDkJzIDxndjEV6/YsKhGRsosCcTIzxf@LUzIyaTnIUP747wZBwx/jv6E814OJPdO0prKEFDD2oipcdSQFDtGtXNRnzeCSG63W7Ryd4HJkkLiUuFfAxLxWjRaXHA25aXgVatzAHTORAEmSfZVNeKHdi824ECIUvaK2gLWa0cr5T1lzPuPUV/wu1bcAkfHSHrmeNcVsJc3/vxvKA5Xiz/5Lm5xjx9Aw "C# (Mono) – Try It Online")