Teorema Euler dan Pangkat Modular Bagian 1

Apa yang akan kita kerjakan hari ini? (1) Ekstraksi modular;

# Apakah
print 27**10 % 11 == 1
# True

# Apakah
print 27 % 7 == -1
# False

# Apakah
print 27**41 % 77 == 27
print 27**(40+1) % 77 == 27
# True
# True

# Apakah
print 27**41 % 11 == 5
print 27 % 11 == 5
# True
# True

# Apakah
print 27**6% 7 == 1
print 27**41 % 7 == -1
print 27**(42-1) % 7 == -1
print 27**(-1) % 7 == -1
# True
# False
# False
# False

print 27**41 % 7
# 6
print 27**(42-1) % 7
# 6
print 27**(-1) % 7
# 0.037037037037
Advertisements

One thought on “Teorema Euler dan Pangkat Modular Bagian 1

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s