Archimedes' Cattle Problem

Author

Eric W. Weisstein
November 2, 2004

This notebook downloaded from http://mathworld.wolfram.com/notebooks/DiophantineEquations/ArchimedesCattleProblem.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/ArchimedesCattleProblem.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Additional Authors

Adam Strzebonski

Simple Version

eqns=W==5/6X+Z&&
X==9/20Y+Z&&
Y==13/42W+Z&&
w==7/12(X+x)&&
x==9/20(Y+y)&&
y==11/30(Z+z)&&
z==13/42(W+w);

(First/@eqns/.And->Alternatives)∈Integers

(First[#]>0&/@eqns)

List@@First/@eqns

Reduce[eqns&&
(First/@eqns/.And->Alternatives)∈Integers&&
(First[#]>0&/@eqns)&&
Z>0&&
Z∈Integers,
List@@First/@eqns
]

Complicated Version

eqns=-T+X==5*Y/6&&
-T+Y==9*Z/20&&
-T+Z==13*X/42&&
x==7*(y+Y)/12&&
y==9*(z+Z)/20&&
z==11*(t+T)/30&&
t==13*(x+X)/42&&
X+Y==U^2&&
2Z+2T==V^2+V;

Try to do it by brute force:

ans=Flatten[{U,V,x,y,z,t,X,Y,Z,T}/.FindInstance[eqns&&x>0&&y>0&&z>0&&t>0&&X>0&&Y>0&&Z>0&&T>0&&U>0&&V>0,{U,V,x,y,z,t,X,Y,Z,T},Integers]];//Timing

Requires more than 3.4 GB, so we run out of memory :(

V=(V1-1)/2;

This is the only non automatic trick we need to do.  Integer solution for V1 need not give an integer solution for V, but luckily in this case it does.

ans=Flatten[{U,V,x,y,z,t,X,Y,Z,T}/.FindInstance[eqns&&x>0&&y>0&&z>0&&t>0&&X>0&&Y>0&&Z>0&&T>0&&U>0&&V1>0,{U,V1,x,y,z,t,X,Y,Z,T},Integers]];//Timing

IntegerQ/@ans

V=.
eqns/.Thread[{U,V,x,y,z,t,X,Y,Z,T}->ans]

N[ans]//InputForm

N[Plus@@Drop[ans,2],110]

Equal@@{RealDigits[7.76027140648681826953023283321388666423232240592337610315061922690321593061406953194348955323833033238580023195089004703`110.*^206544,10,105][[1]],
{7,7,6,0,2,7,1,4,0,6,4,8,6,8,1,8,2,6,9,5,3,0,2,3,2,8,3,3,2,1,3,8,8,6,6,6,4,2,3,2,3,2,2,4,0,5,9,2,3,3,7,6,1,0,3,1,5,0,6,1,9,2,2,6,9,0,3,2,1,5,9,3,0,6,1,4,0,6,9,5,3,1,9,4,3,4,8,9,5,5,3,2,3,8,3,3,0,3,3,2,3,8,5,8,0}
}

Vardi's Form

vardi=Block[{$MaxExtraPrecision=10^6},
Floor[ (25194541/184119152)
(((109931986732829734979866232821433543901088049+50549485234315033074477819735540408986340 (Sqrt[4729494])))^4658)]
];

N/@{Plus@@Drop[ans,2],vardi}

N[Plus@@Drop[ans,2]-vardi,20]

Wrong Statement from OEIS

"50389082*t(1)^2, where (s(1), t(1)) is the smallest nontrivial solution to s^2 - D*t^2=1, with D=410286423278424"

N[tinst=FindInstance[s^2-410286423278424 t^2==1&&s>0&&t>0,{s,t},Integers]]

50389082t^2/.tinst//N

(soln=Reduce[s^2-410286423278424 t^2==1&&s>0&&t>0,{s,t},Integers])//N

Table[soln[[-1,-1]]/.C[1]->n,{n,3}]//N