Fun modular arithmetic problem I discovered on my own @perl
\[\LARGE a^n \mod[a(a-1)]=a\]
ok
See, the key here is that you're almost mod a^2, but not quite. So every time you square a, you divide out almost all of it leaving just one single a left.
A simple example: \[\large 3^2\mod 6=9\mod6=(9-6)\mod6=3 \mod 6\]
the mod function in the equation editor does some really weird spacing.
yeah i had to read that twice :)
ok 3^3 mod 6 = (27 - 4*6) mod 6 = 3 mod 6 in general a^n - k*(a(a-1)) = a mod (a(a-1)) for k big enough
therefore a^n = a mod (a(a-1))
what was your problem that you did in the chat box
Well I like to think of it, as long as you have \[\LARGE a^2\mod k = a\] You have all of them.
right because a^3 = a^2 * a , etc
Yeah, I also think it's generalizable, I haven't gotten around to it yet but like if you do something it will only equal itself for every 3rd power etc... So \[\LARGE a^{3n}\mod k= a\] That kind of thing. Or easily 3n+1 or 6n+4 or whatever you wish.
I suspect it's something like: \[\LARGE a^{nk} \mod (a^k-1) = a\] But I don't know if that's quite right...
im looking over this again so if you start with a mod (a^2 - a ) a^2 mod (a^2 -a ) = a because a^2 is bigger than (a^2 - a) by 'a' Also you might have to say, this is only valid for a > 2 1^2 mod (1-1) = 0 2^2 mod (2^2 -2) = 4 mod 2 = 0 3^2 ( mod 3^2 - 3 ) = 3 and then by modular math a^n = a^(2n)= (a^2)*(a^2) ,... = a * a ...= a or if a^(2n+1) = a^(2n) * a = a*a = a
True, I forgot about that. Although it's not at all clear what mod0 represents.
yeah i get an error when i try to do 1 mod 0 = it says divide by zero , probably because the definition of mod a mod n = remainder of (a /n ) long division style
Join our real-time social learning platform and learn together with your friends!