Search:

Type: Posts; User: Zaphod_b

Search: Search took 0.10 seconds.

  1. Replies
    4
    Views
    3,160

    Re: Making number spirals

    On the other hand, if you have some reason to actually generate the spirals incrementally, you could try something like


    //
    //Direction of the result is clockwise out from the center.
    ...
  2. Replies
    4
    Views
    3,160

    Re: Making number spirals

    Well, for starters, you are only going to test elements on the diagonal and antidiagonal for primality, so why bother to wrap yourself around in circles generating entire arrays? Just look at the...
Results 1 to 2 of 2