

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



KEYWORD



AUTHOR



STATUS

approved



