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 A342866 #16 May 06 2022 13:13:51 %S A342866 1,2,3,2,3,2,3,2,3,3,3,2,3,3,4,2,3,2,3,3,4,3,3,2,3,3,3,3,3,4,3,2,6,3, %T A342866 5,2,3,3,6,3,3,3,3,3,4,3,3,2,3,3,6,3,3,2,5,3,6,3,3,4,3,3,4,2,7,4,3,3, %U A342866 6,4,3,2,3,3,4,3,6,3,3,3,3,3,3,3,4,3,6 %N A342866 The number of elements in the continued fraction for phi(n)/n, where phi is the Euler totient function (A000010). %H A342866 Amiram Eldar, <a href="/A342866/b342866.txt">Table of n, a(n) for n = 1..10000</a> %F A342866 a(n) = 2 if and only if n is in A007694. %F A342866 a(p) = 3 for an odd prime p. %e A342866 a(2) = 2 since the continued fraction of phi(2)/2 = 1/2 = 0 + 1/2 has 2 elements: {0, 2}. %e A342866 a(3) = 3 since the continued fraction of phi(3)/3 = 2/3 = 0 + 1/(1 + 1/2) has 3 elements: {0, 1, 2}. %e A342866 a(15) = 4 since the continued fraction of phi(15)/15 = 8/15 = 0 + 1/(1 + 1/(1 + 1/7)) has 4 elements: {0, 1, 1, 7}. %t A342866 a[n_] := Length @ ContinuedFraction[EulerPhi[n]/n]; Array[a, 100] %o A342866 (PARI) a(n) = #contfrac(eulerphi(n)/n); \\ _Michel Marcus_, Mar 30 2021 %Y A342866 Cf. A000010, A007694, A076512, A109395, A342867. %Y A342866 Cf. A071862 (similar, with sigma(n)/n). %K A342866 nonn,easy %O A342866 1,2 %A A342866 _Amiram Eldar_, Mar 27 2021