Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

something like this:

facteurs = list((410767).factor())
print(facteurs)

[(7, 2), (83, 1), (101, 1)]

solution = facteurs
deja =[p for p,e in facteurs]
for premier in primes(facteurs[0][0]+1,stop=facteurs[-1][0]):
        if premier not in deja:
            solution.append((premier,0))
print(solution)

[(7, 2), (83, 1), (101, 1), (11, 0), (13, 0), (17, 0), (19, 0), (23, 0), (29, 0), (31, 0), (37, 0), (41, 0), (43, 0), (47, 0), (53, 0), (59, 0), (61, 0), (67, 0), (71, 0), (73, 0), (79, 0), (89, 0), (97, 0)]

happy new year