Telegram Group & Telegram Channel
def prime_factors(num):
factor = 2
while num > 1:
if num % factor == 0:
yield factor
num = num // factor
else:
factor += 1

for k in [2,3,5,7,11,13,17,19,23,29]:
print("2^",k,"-1",end="=",sep='')
print(*prime_factors(2**k-1),sep='x')


в статью в Квантике про числа Мерсенна (вошла в №1 за 2025 год) захотелось включить короткую программу, которая демонстрирует, что числа вида 2^p-1 не всегда являются простыми


2^2-1=3
2^3-1=7
2^5-1=31
2^7-1=127
2^11-1=23x89
2^13-1=8191
2^17-1=131071
2^19-1=524287
2^23-1=47x178481
2^29-1=233x1103x2089



group-telegram.com/compmathweekly/5
Create:
Last Update:

def prime_factors(num):
factor = 2
while num > 1:
if num % factor == 0:
yield factor
num = num // factor
else:
factor += 1

for k in [2,3,5,7,11,13,17,19,23,29]:
print("2^",k,"-1",end="=",sep='')
print(*prime_factors(2**k-1),sep='x')


в статью в Квантике про числа Мерсенна (вошла в №1 за 2025 год) захотелось включить короткую программу, которая демонстрирует, что числа вида 2^p-1 не всегда являются простыми


2^2-1=3
2^3-1=7
2^5-1=31
2^7-1=127
2^11-1=23x89
2^13-1=8191
2^17-1=131071
2^19-1=524287
2^23-1=47x178481
2^29-1=233x1103x2089

BY Компьютерная математика Weekly


Warning: Undefined variable $i in /var/www/group-telegram/post.php on line 260

Share with your friend now:
group-telegram.com/compmathweekly/5

View MORE
Open in Telegram


Telegram | DID YOU KNOW?

Date: |

"There is a significant risk of insider threat or hacking of Telegram systems that could expose all of these chats to the Russian government," said Eva Galperin with the Electronic Frontier Foundation, which has called for Telegram to improve its privacy practices. Artem Kliuchnikov and his family fled Ukraine just days before the Russian invasion. Individual messages can be fully encrypted. But the user has to turn on that function. It's not automatic, as it is on Signal and WhatsApp. Anastasia Vlasova/Getty Images WhatsApp, a rival messaging platform, introduced some measures to counter disinformation when Covid-19 was first sweeping the world.
from us


Telegram Компьютерная математика Weekly
FROM American