The first several solutions:
6 (is the minimum value)
66
91
121
286
671
703
726
949
1541
1891
2665
3281
3367
3751
4961
------------
def divides(n,d):
""" bool Does d evenly divide N? """
import math
result = n
while result > d:
result = result - d * 10**int(math.log(result,10) - math.log(d,10))
return result%d == 0
big = 5500
for n in range(1,big):
if divides(3**n-3,n) and not divides(2**n-2,n):
print(n)
|
Posted by Larry
on 2023-08-05 09:35:36 |