Carefree Couple

Author

Eric W. Weisstein
April 20, 2006

This notebook downloaded from http://mathworld.wolfram.com/notebooks/IntegerSequences/CarefreeCouple.nb.

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

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

Initialization

<<Utilities`Plot`
<<NumberTheory`NumberTheoryFunctions`

Enumeration

Coprime

Table[Select[Tuples[Range[n],2],GCD@@#==1&],{n,4}]//ColumnForm

(l0=Table[Count[GCD@@@Tuples[Range[n],2],1],{n,200}])//Timing

N[Last[l0]/Length[l0]^2,10]

(6/(π^2))//N

2Rest[FoldList[Plus,0,Array[EulerPhi,20]]]-1

Sum[MoebiusMu[k]((Floor[(n/k)])^2),{k,n}]

Table[(∑_(k=1)^n)((Floor[(n/k)])^2) MoebiusMu[k],{n,10}]

<<Utilities`Typesetting`

g1=IntegerListPlot[MapIndexed[#1/#2[[1]]^2&,l0]//N,Epilog->{Blue,Dashing[{.02}],Line[{{0,#},{1000,#}}&[6/Pi^2]]},AxesLabel->TraditionalForm/@{x,InlineFraction[(Subscript[C, 0])[x],x^2]}
]

Carefree

Table[Select[Tuples[Range[n],2],GCD@@#==1&&SquareFreeQ[#[[1]]]&],{n,4}]//ColumnForm

(l1=Table[Count[Flatten[Outer[List,Select[Range[n],SquareFreeQ],Range[n]],1],_?(GCD@@#==1&)],{n,200}])//Timing

N[Last[l1]/Length[l1]^2,10]

(1/(Zeta[2]))Times@@(1`20-(1/(#(#+1)))&[Prime[Range[1*^6]]])//Timing

Times@@(1`20-((2#-1)/((#)^3))&[Prime[Range[1*^6]]])//Timing

Times@@(1`20-(1/(#(#+1)))&[Prime[Range[10^5]]])//Timing

g2=IntegerListPlot[MapIndexed[#1/#2[[1]]^2&,l1]//N,Epilog->{Blue,Dashing[{.02}],Line[{{0,#},{1000,#}}&[.4282495]]},AxesLabel->TraditionalForm/@{x,InlineFraction[(Subscript[C, 1])[x],x^2]}
]

Strongly Carefree

Table[Select[Tuples[Select[Range[n],SquareFreeQ],2],GCD@@#==1&],{n,4}]//ColumnForm

l2=Table[Count[Tuples[Select[Range[n],SquareFreeQ],2],_?(GCD@@#==1&)],{n,200}]

N[Last[l2]/Length[l2]^2,10]

(1/((Zeta[2])^2))Times@@(1`20-(1/(((#+1))^2))&[Prime[Range[10^5]]])//Timing

N[Times@@(1`20-(1/(((#+1))^2))&[Prime[Range[10^5]]]),20]//Timing

g3=IntegerListPlot[MapIndexed[#1/#2[[1]]^2&,l2]//N,
Epilog->{Blue,Dashing[{.02}],Line[{{0,#},{1000,#}}&[.286747]]},AxesLabel->TraditionalForm/@{x,InlineFraction[(Subscript[C, 2])[x],x^2]}
]

Weakly Carefree

Table[Select[Tuples[Range[n],2],GCD@@#==1&&SquareFreeQ/@Or@@#&],{n,4}]//ColumnForm

(l3=Table[Count[Flatten[Outer[List,Range[n],Range[n]],1],_?(GCD@@#==1&&SquareFreeQ/@Or@@#&)],{n,200}])//Timing

N[Last[l3]/Length[l3]^2,10]

g4=IntegerListPlot[MapIndexed[#1/#2[[1]]^2&,l3]//N,Epilog->{Blue,Dashing[{.02}],Line[{{0,#},{1000,#}}&[.596975]]},AxesLabel->TraditionalForm/@{x,InlineFraction[(Subscript[C, 3])[x],x^2]}
]

Plots

Show[GraphicsArray[{{g1,g2},{g3,g4}}],ImageSize->500]