A biquadratic primesieve
Inhaltsverzeichnis

Development of
Algorithmic Constructions

05:00:27
DeutschEnglish
19.Sep 2021

1. Description of the algorithm

2. Visualisation as table

3. Implementation of the algorithm in c++

a) basic algorithm

b) improved algorithm

c) version with segments

d) version with bitwise construction

4. Runtime


1. Description of the Algorithm

This is a primesieve for the primes p=1 mod 8 and p=7 mod 8 up to max_n by using the two dimension function f(u,v)=u2 + 2uv - v2.
The primes do not sieve the array, but as composite value with two different factors have two or more representation of u2 + 2uv - v2 the seperating of the primes from the composites is made by this condition.
At this time the algorithm does not sieve out the prime potences.
The return values are returned in increasing order.

3. Implementation of the Algorithm in c++

a) basic algorithm

b) improved algorithm


c) version with segments


d) version with bitwise array


3. Runtime