

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

Table of n, a(n) for n=2..89.


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
Adjacent sequences: A335617 A335618 A335619 * A335621 A335622 A335623


KEYWORD

nonn,look


AUTHOR

Gordon Ridgard, Oct 02 2020


STATUS

approved



