Sz\303\241m\303\255t\303\263g\303\251pes sz\303\241melm\303\251letJ\303\241rai AntalEzek a programok csak szeml\303\251ltet\303\251sre szolg\303\241lnak1. A pr\303\255mek eloszl\303\241sa, szit\303\241l\303\241s2. Egyszer\305\261 faktoriz\303\241l\303\241si m\303\263dszerek3. Egyszer\305\261 pr\303\255mtesztel\303\251si m\303\263dszerekLUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn4. Lucas-sorozatok5. Alkalmaz\303\241sok 6. Sz\303\241mok \303\251s polinomok7. Gyors Fourier-transzform\303\241ci\303\2638. Elliptikus f\303\274ggv\303\251nyek9. Sz\303\241mol\303\241s elliptikus g\303\266rb\303\251kenrestart;9.1. Elliptikus g\303\266rb\303\251k.#
# This routine randomly choose an elliptic "curve" modulo n,
# where gcd(n,6)=1. The coordinates x,y are choosen
# randomly, the parameter a too, and b is calculated.
# The list [x,y,a,b] is given back or a divisor d of n.
#
ellrand:=proc(n) local x,y,a,b,r,d,f;
r:=rand(n); d:=0;
while d=0 do
x:=r(n); y:=r(n); a:=r(n); b:=y^2-x^3-a*x mod n;
d:=4*a^3+27*b^2 mod n; gcd(d,n);
od;
if %<n and %>1 then return % fi;
[x,y,a,b]; end;ellrand(97); ellrand(97); ellrand(97); ellrand(97); ellrand(97);9.2. Hasse t\303\251tele.#
# This brute force procedure calculate the number of points
# on an elliptic curve modulo p>3, a prime. The curve
# parameters are a, b.
#
ellcount:=proc(a,b,p) local x,c;
c:=1;
for x from 0 to p-1 do c:=c+numtheory[jacobi](x^3+a*x+b,p)+1; od;
c; end;ellrand(97); ellcount(%[3],%[4],97);
ellrand(97); ellcount(%[3],%[4],97);
ellrand(97); ellcount(%[3],%[4],97);
ellrand(97); ellcount(%[3],%[4],97);
ellrand(97); ellcount(%[3],%[4],97);9.3. Gyakorlat.with(plots);implicitplot(y^2=x^3-10*x+10,x=-5..10,y=-20..20,numpoints=10000);9.4. Gyakorlat.#
# Doubling on an elliptic "curve" modulo n, where gcd(n,6)=1.
# P is the point to double and a, b are the parameters.
# The return value is the double of the point P or
# a divisor d of n.
#
elldou:=proc(P,a,b,n) local l,d;
if P[3]=0 then return P fi;
if P[2]=0 then return [0,1,0] fi;
d:=igcdex(2*P[2],n,'l');
if 1<d and d<n then return d fi;
l:=(3*P[1]^2+a)*l mod n;
l^2-2*P[1] mod n;
[%,l*(P[1]-%)-P[2] mod n,1];
end;#
# Addition on an elliptic "curve" modulo n, where gcd(n,6)=1.
# P and Q are the points to add and a,b are the parameters.
# The return value is the sum of the points or a divisor d of n.
#
elladd:=proc(P,Q,a,b,n) local l,d;
if P[3]=0 then return Q fi;
if Q[3]=0 then return P fi;
if P=Q then return elldou(P,a,b,n) fi;
if P[1]=Q[1] then return [0,1,0] fi;
d:=igcdex(P[1]-Q[1],n,'l');
if 1<d and d<n then return d fi;
l:=(P[2]-Q[2])*l mod n;
l^2-P[1]-Q[1] mod n;
[%,l*(P[1]-%)-P[2] mod n,1];
end;n:= 97; P:=[59,92,1]; a:=13; b:=4;elldou(P,a,b,n); elldou(%,a,b,n); elldou(%,a,b,n);elladd(P,P,a,b,n); elladd(%,P,a,b,n); elladd(%,P,a,b,n); elladd(%,P,a,b,n);10. Faktoriz\303\241l\303\241s elliptikus g\303\266rb\303\251kkel11. Pr\303\255mteszt elliptikus g\303\266rb\303\251kkel12. Polinomfaktoriz\303\241l\303\241s13. Az AKS-teszt14. A szita m\303\263dszerek alapjaiLUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn