OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = 2 if and only if n is in A007694.
a(p) = 3 for an odd prime p.
EXAMPLE
a(2) = 2 since the continued fraction of phi(2)/2 = 1/2 = 0 + 1/2 has 2 elements: {0, 2}.
a(3) = 3 since the continued fraction of phi(3)/3 = 2/3 = 0 + 1/(1 + 1/2) has 3 elements: {0, 1, 2}.
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}.
MATHEMATICA
a[n_] := Length @ ContinuedFraction[EulerPhi[n]/n]; Array[a, 100]
PROG
(PARI) a(n) = #contfrac(eulerphi(n)/n); \\ Michel Marcus, Mar 30 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Mar 27 2021
STATUS
approved