• API
• FAQ
• Tools
• Archive
SHARE
TWEET

# Untitled

a guest Aug 20th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. \$ python rosetta.py 5000000 | shuf -n2
2. 1099489
3. 4113097
4.
5. \$ calc '1099489*4113097'
6. 4522304907433
7.
8. \$ pypy easy_primes.py -f 4522304907433 -t 1100000 -v
9. Largest prime 1100009
10. Searching for factors of 4522304907433 up to 2126572 (except not really)
11. Previously unfound/unknown prime: 4113097
12. Successfully found factors: 1099489 * 4113097
13.
14. \$ python3
15. >>> base64.b16encode(int.to_bytes(4522304907433, length=8, byteorder='big', signed=True))
16. b'0000041CEE60A8A9'
17. >>> list(map(int, int.to_bytes(4522304907433, length=8, byteorder='big', signed=True)))
18. [0, 0, 4, 28, 238, 96, 168, 169]
19. >>> list(map(int, int.to_bytes(1099489, length=8, byteorder='big', signed=True)))
20. [0, 0, 0, 0, 0, 16, 198, 225]
21. >>> list(map(int, int.to_bytes(4113097, length=8, byteorder='big', signed=True)))
22. [0, 0, 0, 0, 0, 62, 194, 201]
23.
24. \$ python2
25. >>> from scipy.fftpack import (fft, ifft)
26. >>> import numpy as np
27. >>> ifft(np.multiply(fft([0, 0, 0, 0, 0, 16, 198, 225]), fft([0, 0, 0, 0, 0, 62, 194, 201]))).real
28. array([-7.27595761e-12,  0.00000000e+00,  9.92000000e+02,  1.53800000e+04,
29.         5.55780000e+04,  8.34480000e+04,  4.52250000e+04, -7.27595761e-12])
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.
Not a member of Pastebin yet?