Golden Ratio

Author

Eric W. Weisstein
April 17, 2024

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Constants/GoldenRatio.nb.

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

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

Notation

GoldenRatio//TraditionalForm

Definition

FunctionExpand[GoldenRatio]

Figures

Golden rectangle

With[{style=Directive[20,"FontFamily"->"Times"]},GraphicsRow[{
Graphics[{EdgeForm[Black],FaceForm[Yellow],Rectangle[{0,0},{1,GoldenRatio}],Text[Style[ϕ,style],{0,GoldenRatio/2},{2,0}],Text[Style[1,style],{1/2,GoldenRatio},{0,-2}]}],
Graphics[{Arrowheads[.4],Thickness[.04],Arrow[{{0,0},{.4,0}}]}],
Graphics[{FaceForm[None],EdgeForm[Black],Rectangle[{0,0},{1,GoldenRatio}],
FaceForm[Yellow],Rectangle[{0,0},{1,GoldenRatio-1}],
Arrowheads[{-1,1}.1],Arrow[{{-.1,0},{-.1,GoldenRatio}}],Text[Style[ϕ ,style],{-.1,GoldenRatio/2},Background->White],Text[Style[1,style],{1/2,GoldenRatio},{0,-2}],
Text[Style[1,style],{1/2,GoldenRatio-1},{0,-2}],
Text[Style[1,style],{1,GoldenRatio-1/2},{-3,0}],
Text[Style[ϕ-1,style],{1,(GoldenRatio-1)/2},{-1.5,0}]
}]
}]]

GoldenRatioExtremeAndMeanRatios

With[{h=.1,style=Directive[18,FontFamily->"Times"]},Graphics[{
Line[{{0,0},{GoldenRatio+1,0}}],{Text[Style[Style[#,Italic],style],{#2,-.2},{0,1}],Line[{{#2,-h},{#2,h}}]}&@@@Transpose[{{"A","B","C"},{0,GoldenRatio,1+GoldenRatio}}],
Text[Style[#,style],{#2,.3},{0,1}]}&@@@Transpose[{{ϕ,1},{GoldenRatio/2,GoldenRatio+1/2}}]]]

GoldenRatioRectangleTriangles

With[{r=.6,style=Directive[18,FontFamily->"Times"]},Graphics[{
FaceForm[None],EdgeForm[Black],
Rectangle[{0,0},{GoldenRatio+1,r(1+GoldenRatio)}],Polygon[{{0,r(1+GoldenRatio)},{1,0},{1+GoldenRatio,r GoldenRatio}}],
Text[Style[Style[#,Italic],style],#2,#3]&@@@Transpose[{
CharacterRange["A","F"],
{{0,0},{1+GoldenRatio,0},(1+GoldenRatio){1,r},{0,r(1+GoldenRatio)},{1,0},{1+GoldenRatio,r GoldenRatio}},1.5{{1,1},{-1,1},-{1,1},{1,-1},{0,1},{-1,0}}}],
Text[Style[1,style],{1/2,-.2}],
Text[Style[ϕ,style],{1+GoldenRatio/2,-.2}],
Text[Style[ϕ+1,style],{(1+GoldenRatio)/2,r(1+GoldenRatio)+.2}],
Text[Style[Style["r",Italic](ϕ+1),style],{-.35,r(1+GoldenRatio)/2}],
Text[Style[Style["r",Italic]ϕ,style],{1+GoldenRatio+.2,r GoldenRatio/2}],
Text[Style[Style["r",Italic],style],{1+GoldenRatio+.1,r (GoldenRatio+1/2)}]
}]]

GoldenRatioRecurrence

A003849, A188432, A189661

l=Nest[Flatten[#/.{0->{0,1},1->0}]&,{0},10]

A000201

Position[l,0]//Flatten

A001950

Position[l,1]//Flatten

With[{l=Nest[Flatten[#/.{0->{0,1},1->0}]&,{0},20]},ArrayPlot[Table[Mod[l[[x]]-l[[y]],2],{x,128},{y,128}]]]

Special Values

sin(i ln(ϕ))==(i/2)

FullSimplify[Sin[I Log[GoldenRatio]]]

sin((π/2)-i ln(ϕ))==((Sqrt[5])/2)

FullSimplify[Sin[π/2-I Log[GoldenRatio]]]

Trigonometric Formulas

ϕ==(1/2) sec(((2 π)/5))

FunctionExpand[Sec[2Pi/5]/2]

ϕ==2 cos((π/5))

FunctionExpand[2Cos[Pi/5]]

ϕ==(1/2) csc((π/10))

FunctionExpand[Csc[Pi/10]/2]

Identities

(ϕ^n)==(ϕ^(n-1))+(ϕ^(n-2))

FullSimplify[GoldenRatio^n-(GoldenRatio^(n-1)+GoldenRatio^(n-2))]

FullSimplify[(GoldenRatio^(n-1)+GoldenRatio^(n-2))]

(ϕ^n)==ϕ (Fibonacci[n])+(Fibonacci[n-1])

FullSimplify[GoldenRatio^n-(Fibonacci[n]GoldenRatio+Fibonacci[n-1])]

FullSimplify[(Fibonacci[n]GoldenRatio+Fibonacci[n-1])]

Series

ϕ==(∑_(n=0)^∞)(((((-1))^(n+1)) (2 n+1)!)/((4^(2 n+3)) (n+2)! n!))+(13/8)

V5

FullSimplify[(-1)^(n+1)(2n+1)!/(n+2)!/n!/4^(2n+3)]

Simplify[13/8+Sum[(-1)^(n+1)(2n+1)!/(n+2)!/n!/4^(2n+3),{n,0,Infinity}]]

V7

Sum[(-1)^(n+1)(2n+1)!/(n+2)!/n!/4^(2n+3),{n,0,∞}]+13/8

FullSimplify[%]

ϕ==(∑_(n=1)^∞)((((-1))^(n+1))/((Subscript[F, n]) (Subscript[F, n+1])))+1

v4.2

(1+Sum[(-1)^(n+1)/Fibonacci[n]/Fibonacci[n+1],{n,Infinity}])//InputForm

FullSimplify[FunctionExpand[(-1)^(n+1)/Fibonacci[n]/Fibonacci[n+1]],n∈Integers&&n>0]

1+Sum[((5 (((-4))^n) (((1+(Sqrt[5])))^(1+2 n)))/(((((-4))^n)-(((1+(Sqrt[5])))^(2 n))) ((((-1))^n) (2^(1+2 n))+(((1+(Sqrt[5])))^(2 n)) (3+(Sqrt[5]))))),{n,∞}]

N[%,20]

v5.0

(1+Sum[(-1)^(n+1)/Fibonacci[n]/Fibonacci[n+1],{n,Infinity}])

(1+Sum[(-1)^(n+1)/Fibonacci[n]/Fibonacci[n+1],{n,Infinity}])//InputForm

FullSimplify[FunctionExpand[(-1)^(n+1)/Fibonacci[n]/Fibonacci[n+1]],n∈Integers&&n>0]

1+Sum[((5 (((-2))^n) (((1+(Sqrt[5])))^(1+n)))/(((((-(2/(1+(Sqrt[5])))))^n)-((((1/2) (1+(Sqrt[5]))))^n)) ((((-1))^n) (2^(1+2 n))+(((1+(Sqrt[5])))^(2 n)) (3+(Sqrt[5]))))),{n,∞}]

N[%,20]

v6.0

$Version

(1+Sum[(-1)^(n+1)/Fibonacci[n]/Fibonacci[n+1],{n,Infinity}])

1+Sum[FunctionExpand[(-1)^(n+1)/Fibonacci[n]/Fibonacci[n+1]],{n,Infinity}]

V7

Sum[((((-1))^(n+1))/(Fibonacci[n]Fibonacci[n+1])),{n,1,∞}]+1

Nested Radicals

V6

RSolve[{a[n]^2==1+a[n-1],a[1]==1},a[n],n]

V7

RSolve[{a[n]^2==1+a[n-1],a[1]==1},a[n],n]

RSolve[{a[n]==(Sqrt[1+a[n-1]]),a[1]==1},a[n],n]

l=NestList[Sqrt[1+#]&,1,6]

N[l]

<<Utilities`Typesetting`

RootReduce/@l//Column//TraditionalForm

cl=CoefficientList[-1-8 ((#1)^4)+8 ((#1)^6)+14 ((#1)^8)-32 ((#1)^10)+24 ((#1)^12)-8 ((#1)^14)+((#1)^16)&[x],x][[1;;-1;;2]]

Reverse[%]

Power Recurrence

V6

FullSimplify[RSolve[{a[n]==a[n-1]+a[n-2],a[0]==1,a[1]==GoldenRatio},a[n],n]]

FunctionExpand[GoldenRatio]

V7

RSolve[{a[n]==a[n-1]+a[n-2],a[0]==1,a[1]==GoldenRatio},a[n],n]

FullSimplify[%]

Fibonacci Numbers

Limit

(lim_(n->∞)) ((Fibonacci[n])/(Fibonacci[n+1]))

Limit[((Fibonacci[n])/(Fibonacci[n+1])),n->∞]

(lim_(n->∞)) ((Fibonacci[n+1])/(Fibonacci[n]))

Limit[((Fibonacci[n+1])/(Fibonacci[n])),n->∞]

FullSimplify[%]

(lim_(n->∞)) ((Fibonacci[n])/(Fibonacci[n-1]))

Limit[((Fibonacci[n])/(Fibonacci[n-1])),n->∞]

Convergents

FromContinuedFraction/@Reverse[NestList[Rest,ContinuedFraction[GoldenRatio,10],9]]

Table[FromContinuedFraction[ContinuedFraction[GoldenRatio,n]],{n,10}]

NestList[1+1/#&,1,9]

V14

RSolve[{a[n]==1+1/a[n-1],a[1]==1},a[n],n]

FullSimplify[%,n∈Integers]

V7

RSolve[{a[n]==1+1/a[n-1],a[1]==1},a[n],n]

FullSimplify[%,n∈Integers&&n>0]

Table[((Fibonacci[n]+LucasL[n])/(2 Fibonacci[n])),{n,10}]

Table[((Fibonacci[n+1])/(Fibonacci[n])),{n,10}]

FullSimplify[((Fibonacci[n]+LucasL[n])/(2 Fibonacci[n]))]

FullSimplify[((Fibonacci[n]+LucasL[n])/(2 Fibonacci[n]))-((Fibonacci[n+1])/(Fibonacci[n]))]

V6

RSolve[{a[n]==1+1/a[n-1],a[1]==1},a[n],n]

FullSimplify[%,n∈Integers]

Table[Simplify[(1/2) (1+(Sqrt[5]))+(((Sqrt[5]) (((1-(Sqrt[5])))^n))/(-(((1-(Sqrt[5])))^n)+(((1+(Sqrt[5])))^n)))],{n,10}]

Table[Fibonacci[n+1]/Fibonacci[n],{n,10}]

Khinchin and Khinchin-Lévy Constant

KhinchinList[x_,n_:200]:=MapIndexed[#1^(1/#2[[1]])&,Rest@FoldList[Times,1,Rest[ContinuedFraction[Mod[x,1],n+1]]]]
KhinchinLevyList[x_,n_:200]:=MapIndexed[#1^(1/#2[[1]])&,Denominator/@FromContinuedFraction/@Reverse[NestList[Drop[#,-1]&,Rest[ContinuedFraction[Mod[x,1],n+1]],n]]]

<<Utilities`Typesetting`

V5

With[{k=5000,c=GoldenRatio},
g1=ListPlot[KhinchinList[c,k],PlotJoined->True,PlotStyle->Red,AxesLabel->TraditionalForm/@{n,((Subscript[a, 1])(Subscript[⋯a, n]))^InlineFraction[1,n]},
DisplayFunction->Identity,
PlotLabel->StyleForm["Khinchin's constant",FontFamily->"Times",FontSlant->"Italic"],
Epilog->{Blue,Dashing[{.02}],Line[{{0,#},{k,#}}]&[2.685452001]}];
g2=ListPlot[KhinchinLevyList[c,k],PlotJoined->True,PlotStyle->Red,AxesLabel->TraditionalForm/@{n,(Subscript[q, n])^InlineFraction[1,n]},
DisplayFunction->Identity,
PlotLabel->StyleForm["Khinchin-Lévy constant",FontFamily->"Times",FontSlant->"Italic"],
Epilog->{Blue,Dashing[{.02}],Line[{{0,#},{k,#}}]&[Exp[Pi^2/12/Log[2]]]}
];
]//Timing

Show[GraphicsArray[{g1,g2}]]

V7

With[{k=5000,c=GoldenRatio},
g1=ListPlot[KhinchinList[c,k],Joined->True,PlotStyle->Red,AxesLabel->{n,(Subscript[a,1]⋯ Subscript[a,n])^InlineFraction[1,n]},
PlotLabel->StyleForm["Khinchin's constant",FontFamily->"Times",FontSlant->"Italic"],
Epilog->{Blue,Dashing[{.02}],Line[{{0,#},{k,#}}]&[2.685452001]}];
g2=ListPlot[KhinchinLevyList[c,k],Joined->True,PlotStyle->Red,AxesLabel->{n,(Subscript[q, n])^InlineFraction[1,n]},
PlotLabel->StyleForm["Khinchin-Lévy constant",FontFamily->"Times",FontSlant->"Italic"],
Epilog->{Blue,Dashing[{.02}],Line[{{0,#},{k,#}}]&[Exp[Pi^2/12/Log[2]]]}
];
]//Timing

GraphicsGrid[{{g1,g2}},ImageSize->400,Spacings->-40]

Fractional parts

Figure

With[{h=.015,dy=.08,dx=.02,c=GoldenRatio},Graphics[
Table[With[{y=-n dy,frac=FractionalPart[c Range[n]]},{
Text[n,{-dx,y},{1,0}],
Text[N@Last@frac,{1+dx,y},{-1,0}],
AbsolutePointSize[6],Point[{#,y}&/@frac],
Line[{{0,y},{1,y}}],
Line[{{#,y+h},{#,y-h}}]&/@Subdivide[0,1,n]
}],{n,10}]]]

Counts of fractional parts in equidistributed bins

A194293

(rows=Table[BinCounts[FractionalPart[GoldenRatio Range[n]],{0,1,1/n}],{n,20}])//Column

Fibonacci numbers

Module[{h=.015,dy=.08,dx=.02,i=0},Graphics[
Table[With[{y=-(++i) dy,frac=FractionalPart[GoldenRatio Range[n]]},{
Text[n,{-dx,y},{1,0}],
Text[N@Last@frac,{1+dx,y},{-1,0}],
AbsolutePointSize[6],Point[{#,y}&/@frac],
Line[{{0,y},{1,y}}],
Line[{{#,y+h},{#,y-h}}]&/@Subdivide[0,1,n]
}],{n,Fibonacci[Range[11]]}]]]

Follows from:

Fract (F (n)*phi) = (1/2)*(1 + (-1)^n) - (-phi)^(-n)

(on https://oeis.org/A000045) that FractionalPart[Fibonacci[n]GoldenRatio] is equidistributed

FullSimplify[FractionalPart[Fibonacci[n]GoldenRatio],n∈PositiveIntegers]

FunctionExpand[FractionalPart[Fibonacci[n]GoldenRatio],n∈PositiveIntegers]

seq1=Table[FractionalPart[GoldenRatio Fibonacci[n]],{n,10}]

seq2=Table[(1/2)(1+(((-1))^n))-(((-GoldenRatio))^(-n)),{n,10}]

FullSimplify[seq1-seq2]

FullSimplify[Subtract@@{FractionalPart[GoldenRatio Fibonacci[n]],(1/2)(1+(((-1))^n))-(((-GoldenRatio))^(-n))},n∈PositiveIntegers]

Numbers of empty intervals

A036414

Count[#,0]&/@rows

Table[Count[BinCounts[FractionalPart[GoldenRatio Range[n]],{0,1,1/n}],0],{n,95}]

Values of n  for which no bins are left blank

A036415

Position[rows,{1..}]//Flatten

BFileSequence[36415]

Position[Table[Count[BinCounts[FractionalPart[GoldenRatio Range[n]],{0,1,1/n}],0],{n,1000}],0]//Flatten//Timing

See also NumberTheory/EquidistributedSequence.nb

<<MathWorld`IntegerSequences`

AbsoluteTiming[Sequence@@Timing[EquidistributedSubdivisions[GoldenRatio,5*^5]]]

AbsoluteTiming[Sequence@@Timing[EquidistributedSubdivisions[GoldenRatio,1*^6]]]

AbsoluteTiming[Sequence@@Timing[EquidistributedSubdivisions[GoldenRatio,1*^7]]]

Non-Fibonacci terms

<<MathWorld`Graphs`

terms=BFileSequence[36415]

fibonacci=Fibonacci[Range[2,30]]

Intersection[terms,Fibonacci[Range[30]]]===fibonacci

Complement[terms,Fibonacci[Range[30]]]

Table[Fibonacci[n-3],{n,11,20}]

BBP-type formula search

Search

<<Utilities`Simplify`

Monitor[Do[If[(b=FindBasis[GoldenRatio,-3^k,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,16},{n,64},{p,1}],{-3^k,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[GoldenRatio,-3^k,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,16},{n,64},{p,2,2}],{-3^k,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[GoldenRatio,-3^k,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,16},{n,64},{p,3,3}],{-3^k,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[GoldenRatio,-2^k,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,16},{n,64},{p,1}],{-2^k,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[GoldenRatio,-2^k,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,16},{n,64},{p,2,2}],{-2^k,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[GoldenRatio,-2^k,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,16},{n,64},{p,3,3}],{-2^k,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[GoldenRatio,-1,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,0,0},{n,64},{p,1}],{-1,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[GoldenRatio,-1,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,0,0},{n,64},{p,2,2}],{-1,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[GoldenRatio,-1,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,0,0},{n,64},{p,3,3}],{-1,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[GoldenRatio,1,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,0,0},{n,64},{p,2,2}],{1,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[GoldenRatio,1,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,0,0},{n,64},{p,3,3}],{1,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[GoldenRatio,2^k,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,16},{n,64},{p,1}],{2^k,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[GoldenRatio,2^k,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,16},{n,64},{p,2,2}],{2^k,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[GoldenRatio,2^k,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,16},{n,64},{p,3,3}],{2^k,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[GoldenRatio,3^k,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,16},{n,64},{p,1}],{3^k,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[GoldenRatio,3^k,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,16},{n,64},{p,2,2}],{3^k,n,p}];//Timing

Monitor[Do[If[(b=FindBasis[GoldenRatio,3^k,n,BasisPower->p,WorkingPrecision->300])=!={},Print[b]],{k,16},{n,64},{p,3,3}],{3^k,n,p}];//Timing