1.1 ! maekawa 1: lucas(p) = ! 2: { ! 3: local(u,q); u=4; q=1<<p - 1; ! 4: for(k=3,p, u = (sqr(u)-2)%q); ! 5: u == 0 ! 6: }