OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..1000
EXAMPLE
A040001 (cfrac for n=1) has period length 2, so a(1)=2. A040008 (cfrac for n=2) has period length 2, so a(2)=2. A040021 (cfrac for =3) has period length 2, so a(3)=2. - R. J. Mathar, Feb 10 2016
MAPLE
f:= proc(n) uses NumberTheory;
nops(Term(ContinuedFraction(sqrt(3)*n), periodic)[2])
end proc:
map(f, [$1..100]); # Robert Israel, Apr 14 2026
MATHEMATICA
Table[Length[Last[ContinuedFraction[Sqrt[3] n]]], {n, 128}]
CROSSREFS
KEYWORD
nonn
AUTHOR
R. K. Guy, Oct 26 2001
STATUS
approved
