Diophantus Property

Author

Eric W. Weisstein
September 5, 2004

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

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

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

Code

DiophantusSums[l_List,n_]:=Module[{m=Length[l],i,j,pairs},
pairs=Flatten[Table[l[[{i,j}]],{i,m},{j,i+1,m}],1];
n+#&/@Times@@@pairs
]

DiophantusPairs[l_List,n_]:=Module[{m=Length[l],i,j},
Flatten[Table[l[[{i,j}]],{i,m},{j,i+1,m}],1]
]
(*
Diophantus2Q[l_List,n_]:=Module[{pairs=DiophantusPairs[l,n],len,i=1},
len=Length[pairs];
While[IntegerQ[Sqrt[n+Times@@pairs[[i]]]]&&i++<len];
i==len+1
]
*)

DiophantusQ[l_List /; Length[l]==2,n_]:=IntegerQ[Sqrt[n+Times@@l]]

DiophantusQ[l_List,n_]:=IntegerQ[Sqrt[n+Times@@#]]&/@And@@DiophantusPairs[l,n]

2-element D(1)

<<Utilities`EISFormat`

dioph={};
max=150;
Do[
If[DiophantusQ[{i,j},1],AppendTo[dioph,{i,j}]],
{i,max},{j,i+1,max}];
dioph21=Sort[dioph,Max[#1]<=Max[ #2]&];

FormatSequence[Transpose[dioph21][[1]],050269,1,
Name->"Smallest value a for Diophantine 1-doubles (a,b) ordered by smallest b.",
Cross->{050270},
HTML->"<a href=\"http://www.treasure-troves.com/math/DiophantusProperty.html\">Source</a>"
]

FormatSequence[Transpose[dioph21][[2]],050270,1,
Name->"Largest value b for Diophantine 1-doubles (a,b) ordered by smallest b.",
Cross->{050269},
HTML->"<a href=\"http://www.treasure-troves.com/math/DiophantusProperty.html\">Source</a>"
]

3-element D(1)

dioph={};
max=200;
Print[Do[
If[DiophantusQ[{i,j,k},1],AppendTo[dioph,{i,j,k}]],
{i,max},{j,i,max},{k,j,max}]//Timing];
dioph31=Sort[dioph,Max[#1]<=Max[ #2]&];

FormatSequence[Transpose[dioph31][[1]],050273,1,
Name->"Smallest value a for Diophantine 1-triples (a,b,c) ordered by smallest c,b.",
Cross->{050274,050275},
HTML->"<a href=\"http://www.treasure-troves.com/math/DiophantusProperty.html\">Source</a>"
]

FormatSequence[Transpose[dioph31][[2]],050274,1,
Name->"Middle value b for Diophantine 1-triples (a,b,c) ordered by smallest c,b.",
Cross->{050273,050275},
HTML->"<a href=\"http://www.treasure-troves.com/math/DiophantusProperty.html\">Source</a>"
]

FormatSequence[Transpose[dioph31][[3]],050275,1,
Name->"Largest value c for Diophantine 1-triples (a,b,c) ordered by smallest c,b.",
Cross->{050273,050274},
HTML->"<a href=\"http://www.treasure-troves.com/math/DiophantusProperty.html\">Source</a>"
]

4-element D(1)

Jones (1976)

c[-1]:=0
c[0]:=0
c[k_]:=c[k]=(4x^2+8x+2)c[k-1]-c[k-2]+4(x+1)

Table[FullSimplify[c[n]],{n,5}]//TableForm

Factor[{x(x+2)+1,(x+2)c[1]+1,c[1]c[2]+1,c[2]c[3]+1,c[3]c[4]+1}]

With[{x=1},Join[{x,x+2},RecurrenceTable[{c[-1]==c[0]==0,c[k]==(4x^2+8x+2)c[k-1]-c[k-2]+4(x+1)},c,{k,1,12}]]]

FormatSequence[Join[{x,x+2},Table[c[n],{n,20}]]/.x->1,
51047,1,
Name->"Numbers which satisfy the Diophantus property D(1), i.e., a(n)a(n+1)+1 is a square number.",
html["DiophantusProperty"],
Cross->{51048}
]

FormatSequence[Sqrt[1+Times@@@Partition[#,2,1]]&[Join[{x,x+2},Table[c[n],{n,20}]]/.x->1],
51048,1,
Name->"Sqrt[a(n)a(n+1)+1] of A05047.",
html["DiophantusProperty"],
Cross->{51047}
]

{Fibonacci[2n],Fibonacci[2n+2],Fibonacci[2n+4],4Fibonacci[2n+1]Fibonacci[2n+2]Fibonacci[2n+3]} /. n->1

{Fibonacci[2n],Fibonacci[2n+2],Fibonacci[2n+4],4Fibonacci[2n+1]Fibonacci[2n+2]Fibonacci[2n+3]} /. n->2

Table[FactorTerms[Expand[c[n]]],{n,5}]//TableForm

Table[Factor[{x c[n]+1,(x+2)c[n]+1}],{n,5}]//TableForm

Table[Factor[c[n]c[n+1]+1],{n,5}]//TableForm

dioph={};
max=150;
Do[
If[DiophantusQ[{i,j,k,l},1],AppendTo[dioph,{i,j,k,l}];Print[dioph]];
If[j==i&&k==j&&l==k,Print[i,"..."]],
{i,max},{j,i,max},{k,j,max},{l,k,max}];
Sort[dioph,Max[#1]<=Max[ #2]&]

5-element D(1)

dioph={};
min=1;
max=50;
Do[
If[DiophantusQ[{i,j,k,l,m},1],AppendTo[dioph,{i,j,k,l,m}];Print[dioph]];
If[j==i&&k==j&&l==k&&m==l,Print[i,"..."]],
{i,min,max},{j,i,max},{k,j,max},{l,k,max},{m,l,max}];
Sort[dioph,Max[#1]<=Max[ #2]&]

dioph={};
min=50;
max=70;
Do[
If[DiophantusQ[{i,j,k,l,m},1],AppendTo[dioph,{i,j,k,l,m}];Print[dioph]];
If[j==i&&k==j&&l==k&&m==l,Print[i,"..."]],
{i,max},{j,i,max},{k,j,max},{l,k,max},{m,min,max}];
Sort[dioph,Max[#1]<=Max[ #2]&]