forked from RyanGreenup/Python-Quant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathA-35.py
33 lines (23 loc) · 826 Bytes
/
A-35.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
############################################################
###### Question 35; Project A ##############################
############################################################
########################################
##### PREAMBLE #########################
########################################
from __future__ import division
from sympy import *
x, y, z, t = symbols('x y z t')
k, m, n = symbols('k m n', integer=True)
f, g, h = symbols('f g h', cls=Function)
init_printing()
init_printing(use_latex='mathjax', latex_mode='equation')
########################################
##### PROBLEM ##########################
########################################
def main(r):
match = []
for n in range(r):
if isprime(n**n + n + 1):
match.append(n)
return match
print(main(100))