Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- N=1 000 000;
- {list=vectorv(200);il=0;
- for(j=1,#list,
- su=0;for(k=1,N,
- m1=100+random(2^31); \ use numbers >=100
- if( m1 % 2
- , m2=(3*m1+1)/2
- , m2=m1/2
- );
- l1=#binary(m1);
- l2=#binary(m2);
- su += (l2>l1)
- );
- il++;
- list[il] = su / N *100.0; \ put the new result into the list
- );
- print(list); } \ the aggregation of data for frequencies-table
- \ has been done outside of Pari/GP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement