Beispiel #1
0
def main():
    for Pa in ngonalNums(5):
        for Pb in ngonalNums(5):
            if Pb >= Pa:
                break
            if pentagonal(Pa + Pb) and pentagonal(Pa - Pb):
                return Pa - Pb
Beispiel #2
0
def main():
	for Pa in ngonalNums(5):
		for Pb in ngonalNums(5):
			if Pb >= Pa:
				break
			if pentagonal(Pa + Pb) and pentagonal(Pa - Pb):
				return Pa - Pb
Beispiel #3
0
def main(limit):
	return next(n for n in ngonalNums(3) if n > limit and pentagonal(n) and hexagonal(n))
Beispiel #4
0
def main(limit):
    return next(n for n in ngonalNums(3)
                if n > limit and pentagonal(n) and hexagonal(n))