Some BCMATH programs involving primes
The Lucas strong base 2 pseudoprime
test
;
Performing
Proth's algorithm;
Generating
prime numbers;
Generating
prime constellations;
Generating
Lucas strong base 2 pseudoprimes;
Finding
the first probable prime p ≥ m;
Finding
the first probable prime p ≥ m, p=ak+b, where gcd(a,b)=1 and a > b > 0;
Perfect-power
testing
;
Factorisation
of small n;
Finding the least prime factor
of small n;
Primitive roots:
Finding
the least primitive root (mod p);
Finding
the least negative primitive root (mod p);
Finding
the least primitive root (mod p) for m ≤ p ≤ n;
Finding
the least negative primitive root (mod p) for m ≤ p ≤ n;
Finding
ord
m
a.
Expressing
a prime p = 4n + 1 as a sum of two squares.
Expressing
a prime 5n ± 1 in the form x
2
+ xy – y
2
, with x > y ≥ 1. (Christina Doran, Shen Lu and Barry R. Smith)
Last modified 29th May 2016
Return to main page