The purpose of the list is to increase the speed of the algorithm by
skipping some numbers. This is possible because of the math of Differences
between consecutive primes but i am currently verifying the algorithm if it
works, since the list might be wrong.

2017-02-25 7:44 GMT+01:00 Lindsay John Lawrence <
lawrence.lindsayj...@gmail.com>:

> Does anyone know the algorithm that is being expressed here?
>
> I am trying to understand the code... http://picolisp.com/wiki/?99p35
>
> de prime-factors (N)
>    (make
>       (let (D 2  L (1 2 2 . (4 2 4 2 4 6 2 6 .))  M (sqrt N))
>          (while (>= M D)
>             (if (=0 (% N D))
>                (setq M (sqrt (setq N (/ N (link D)))))
>                (inc 'D (pop 'L)) ) )
>          (link N) ) ) )
>
> and  having difficulties understanding the purpose of the circular list.
>
> /Lindsay
>
>
>

Reply via email to