A4931. L'entier et son double mime
a
2+(a+1)
2+ … … ..(a+k −1)
2Un automate trouve comme solution : M =4250
Annexe : Programme Python
for k in range(1,100):
for a in range(1,100):
for b in range(1,100):
m = k*a*a + k*(k-1)*a + (k-1)*k*(2*k-1)//6
mm = 2*k*b*b + 2*k*(2*k-1)*b + (2*k-1)*2*k*(4*k-1)//6 if m*2 == mm :
print("Suite 1 commence à ", a ," et contient ", k , "termes") print("Suite 2 commence à ", b ," et contient ", k*2 , "termes") s = 0
for j in range(a,a+k):
s = s+j**2
print("M vaut",s) print(" ")