I don't fully get the sequence, is there an example program? –PkmnQ (talk) 07:29, 9 January 2026 (UTC)
- I've updated it. --A() (talk) 00:42, 10 January 2026 (UTC)
not sure if this was the intention, but you can just repeatedly multiply p and q by 2, making it extremely trivial to implement —aadenboy (talk|contribs) 03:26, 10 January 2026 (UTC)