This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A146477 #10 May 04 2021 09:02:25 %S A146477 2,5,6,17,18,31,41,43,73,89,94,106,118,151,172,193,211,241,265,268, %T A146477 331,334,337,379,394,409,421,433,463,489,521,526,601,604,619,634,673, %U A146477 694,718,721,751,769,886,919,929,937,1033,1039,1114,1174,1201,1249,1291,1321,1324,1471,1516,1579,1609 %N A146477 Numbers k for which A146326(k) is different from A146326(j) for j < k. %C A146477 This sequence is sorted A146343. %C A146477 Original name was: a(n) = smallest numbers which continued fractions have different period. %H A146477 Robert Israel, <a href="/A146477/b146477.txt">Table of n, a(n) for n = 1..700</a> %p A146477 f:= proc(n) if issqr(n) then 0 else nops(numtheory:-cfrac((1+sqrt(n))/2,periodic,quotients)[2]) fi end proc: %p A146477 S:= {0}: R:= NULL: count:= 0: %p A146477 for n from 2 while count < 30 do %p A146477 v:= f(n); %p A146477 if not member(v,S) then %p A146477 count:= count+1; R:= R, n; S:= S union {v}; %p A146477 fi %p A146477 od: %p A146477 R; # _Robert Israel_, May 02 2021 %t A146477 $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] %Y A146477 Cf. A000290, A078370, A146326-A146345, A146348-A146360, A146363. %K A146477 nonn %O A146477 1,1 %A A146477 _Artur Jasinski_, Oct 30 2008 %E A146477 19 replaced by 18, 331 and 334 inserted by _R. J. Mathar_, Nov 08 2008 %E A146477 Name clarified by _Robert Israel_, May 02 2021