login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A342866 The number of elements in the continued fraction for phi(n)/n, where phi is the Euler totient function (A000010). 3

%I #16 May 06 2022 13:13:51

%S 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 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 6,4,3,2,3,3,4,3,6,3,3,3,3,3,3,3,4,3,6

%N The number of elements in the continued fraction for phi(n)/n, where phi is the Euler totient function (A000010).

%H Amiram Eldar, <a href="/A342866/b342866.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = 2 if and only if n is in A007694.

%F a(p) = 3 for an odd prime p.

%e a(2) = 2 since the continued fraction of phi(2)/2 = 1/2 = 0 + 1/2 has 2 elements: {0, 2}.

%e 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 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 a[n_] := Length @ ContinuedFraction[EulerPhi[n]/n]; Array[a, 100]

%o (PARI) a(n) = #contfrac(eulerphi(n)/n); \\ _Michel Marcus_, Mar 30 2021

%Y Cf. A000010, A007694, A076512, A109395, A342867.

%Y Cf. A071862 (similar, with sigma(n)/n).

%K nonn,easy

%O 1,2

%A _Amiram Eldar_, Mar 27 2021

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 8 11:12 EDT 2024. Contains 375021 sequences. (Running on oeis4.)