Testing latest pari + WASM + node.js... and it works?! Wow.
1lucas(p) = 2{ my(u = 4, q = 1<<p - 1); 3 for(k=3, p, u = (sqr(u)-2) % q); 4 u == 0; 5} 6 7