OFFSET
1,1
COMMENTS
This sequence is sorted A146343.
Original name was: a(n) = smallest numbers which continued fractions have different period.
LINKS
Robert Israel, Table of n, a(n) for n = 1..700
MAPLE
f:= proc(n) if issqr(n) then 0 else nops(numtheory:-cfrac((1+sqrt(n))/2, periodic, quotients)[2]) fi end proc:
S:= {0}: R:= NULL: count:= 0:
for n from 2 while count < 30 do
v:= f(n);
if not member(v, S) then
count:= count+1; R:= R, n; S:= S union {v};
fi
od:
R; # Robert Israel, May 02 2021
MATHEMATICA
$MaxExtraPrecision = 300; s = 10; aa = {}; Do[k = ContinuedFraction[(1 + Sqrt[n])/2, 1000]; If[Length[k] < 190, AppendTo[aa, 0], m = 1; While[k[[s ]] != k[[s + m]] || k[[s + m]] != k[[s + 2 m]] || k[[s + 2 m]] != k[[s + 3 m]] || k[[s + 3 m]] != k[[s + 4 m]], m++ ]; s = s + 1; While[k[[s ]] != k[[s + m]] || k[[s + m]] != k[[s + 2 m]] || k[[s + 2 m]] != k[[s + 3 m]] || k[[s + 3 m]] != k[[s + 4 m]], m++ ]; AppendTo[aa, m]], {n, 1, 1200}]; Print[aa]; bb = {}; Do[k = 1; yes = 0; Do[If[aa[[k]] == n && yes == 0, AppendTo[bb, k]; yes = 1], {k, 1, Length[aa]}], {n, 1, 22}]; Sort[bb]
CROSSREFS
KEYWORD
nonn
AUTHOR
Artur Jasinski, Oct 30 2008
EXTENSIONS
19 replaced by 18, 331 and 334 inserted by R. J. Mathar, Nov 08 2008
Name clarified by Robert Israel, May 02 2021
STATUS
approved