![]() |
[QUOTE=CRGreathouse;252199]Can you prove that it behaves the way you expect mod 7? Mod 3? Mod 4?[/QUOTE]
[CODE]for(n=1,100,for(x=1,#MeVec,print1(M(x,n)","));print("::"n))[/CODE] the code I showed to prime95 was : [CODE](11:01)>for(n=1,#mersenne1,print((2^mersenne1[n]-1)%n)) 0 1 1 3 1 1 1 7 1 1 6 7 5 1 7 15 1 1 12 7 10 1 15 7 1 1 1 3 26 1 1 31 7 7 31 31 31 31 1 7[/CODE] |
[QUOTE=CRGreathouse;252199]Can you prove that it behaves the way you expect mod 7? Mod 3? Mod 4?[/QUOTE]
what the valuation code if so no not really, I can't even find a use of valuation because I have no idea what it does. it can't act modulo( checked with second argument as 3) so I'm stumped, oh never mind I think I realize which valuation it's talking of after going through : [url]http://en.wikipedia.org/wiki/Valuation_(mathematics[/url]) |
[QUOTE=CRGreathouse;252199]Can you prove that it behaves the way you expect mod 7? Mod 3? Mod 4?[/QUOTE]
[CODE]0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,::3 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,::4 3,0,3,1,1,3,1,1,1,3,3,1,3,1,1,1,1,1,3,1,3,3,3,3,3,1,1,3,1,1,1,3,3,1,3,3,3,3,1,::7 3,7,31,43,43,31,43,43,43,31,31,43,31,43,43,43,43,43,31,43,31,31,31,31,31,43,43,31,43,43,43,31,31,43,31,31,31,31,43,::84[/CODE] 84 is a multiple of 3,4 and 7 so it's a matter of proving 31 and 43 align with the modulo 3,4 and 7 need according to this. 31%3 == 1 that aligns 43%3== 1 that also aligns, 31%4==3 that aligns and 43%4==3 so that also aligns, 31%7 =3 that aligns, 43%7 = 1 this also can align with the modulo so it is in fact plausible that this is true. Plausible is not a proof I know that. The proof needs to be more rigorous, if it's true maybe we can eliminate more checks when combined with 24x+7. though we know what x are mersenne numbers(it doesn't look to help though). |
[CODE]minimumprime(x) = if((x-2)%2==1,print(6*((x-2)-floor((x-2)*.5))-1),print(6*floor((.5*(x-2)))+1))[/CODE]
just thought I'd put this up. |
[QUOTE=science_man_88;252271][CODE]minimumprime(x) = if((x-2)%2==1,print(6*((x-2)-floor((x-2)*.5))-1),print(6*floor((.5*(x-2)))+1))[/CODE]
just thought I'd put this up.[/QUOTE] and one thing I just learned by playing alt + 1(numpad) gets you back to the start of text and yes I get it's the control character start of header. something tells me if i every make long scripts that act as one line in PARI I'll be able to use it. |
[QUOTE=science_man_88;252271][CODE]minimumprime(x) = if((x-2)%2==1,print(6*((x-2)-floor((x-2)*.5))-1),print(6*floor((.5*(x-2)))+1))[/CODE]
just thought I'd put this up.[/QUOTE] Don't print, just return! That way you can actually use the value instead of merely looking at it. |
[QUOTE=CRGreathouse;252305]Don't print, just return! That way you can actually use the value instead of merely looking at it.[/QUOTE]
I changed it to returning it the hard part now is I was trying to make a script that could use that value to get the real answer because by x = 1000 it's off by about 5000: [CODE]v=vector(13,n,minimumprime(n));v[1]=2;v[2]=3;c=[];a=0;for(x=1,#v,for(y=1,x-1,if(v[x]%v[y]==0,a=a+1));if(!a>1,c=concat(c,[v[x]])))[/CODE] is my best attempt so far, but anyways I'm kinda repeating the same task I know. |
I don't know what the function is supposed to return, nor by what measure it's off by 5000.
|
[QUOTE=CRGreathouse;252307]I don't know what the function is supposed to return, nor by what measure it's off by 5000.[/QUOTE]
[CODE](21:44)>prime(1000) %38 = 7919 (22:00)>minimumprime(1000) %39 = 2995[/CODE] |
[QUOTE=science_man_88;252310][CODE](21:44)>prime(1000)
%38 = 7919 (22:00)>minimumprime(1000) %39 = 2995[/CODE][/QUOTE] Are you trying to have it return the n-th prime? Why not use prime() in that case? :confused: |
[QUOTE=CRGreathouse;252313]Are you trying to have it return the n-th prime? Why not use prime() in that case? :confused:[/QUOTE]
because I want to try and make one that works without that so it's not limited by primelimit. |
| All times are UTC. The time now is 23:02. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.