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!)
A335620 The depth (number of inherent divisions plus 1 for the initial integer) of the continued fraction form of the rational number n/pi(n), where n is an integer >= 2 and pi(n) is the number of primes <= n. 0
1, 2, 1, 3, 1, 3, 1, 2, 2, 2, 3, 2, 2, 2, 3, 3, 4, 4, 2, 5, 3, 4, 3, 4, 3, 1, 2, 3, 1, 4, 3, 1, 2, 3, 4, 2, 2, 2, 2, 3, 3, 2, 2, 4, 3, 3, 2, 4, 2, 3, 3, 3, 4, 4, 2, 5, 5, 3, 4, 5, 3, 2, 4, 6, 3, 4, 6, 6, 4, 5, 4, 3, 4, 4, 7, 3, 4, 5, 5, 4, 5, 6, 5, 5, 5, 6, 5, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,2
LINKS
EXAMPLE
If n=21 then pi(21)=8 and the rational number is 21/8 = 2+1/(1+1/(1+1/(1+1/2))), which has 5 iterations, so a(21)=5.
MATHEMATICA
a[n_] := Length @ ContinuedFraction[n/PrimePi[n]]; Array[a, 100, 2] (* Amiram Eldar, Oct 11 2020 *)
PROG
(PARI) a(n) = #contfrac(n/primepi(n)); \\ Michel Marcus, Oct 11 2020
CROSSREFS
Cf. A000720.
Sequence in context: A078079 A328049 A328050 * A176982 A079728 A181801
KEYWORD
nonn,look
AUTHOR
Gordon Ridgard, Oct 02 2020
STATUS
approved

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 February 25 02:17 EST 2024. Contains 370308 sequences. (Running on oeis4.)