Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #7 Apr 03 2023 10:36:10
%S 1,2,4,5,5,6,6,7,7,8,8,8,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,
%T 13,13,13,14,14,14,14,14,15,15,15,15,15,16,16,16,16,17,17,17,17,17,17,
%U 18,18,18,18,18,19,19,19,19,19,20,20,20,20,20,20,21,21,21,21,21,22,22
%N Number of steps required for initial p = 2^n to reach 1 in the recurrence p = floor(Li(p)).
%C Except for the first few terms, corresponding terms in this sequence and the one using pi(n) are equal. If we define Li(1) = 0 then the terms will differ by 1 since we carry the pi(n) calculation to pi(1) which is 0.
%H Andrew Booker, <a href="https://t5k.org/nthprime/index.php#piofx">The Nth Prime Page</a>.
%F Li(n) = logarithmic integral Li(x) = integral(x=2..n, dx/log(x)) ~ pi(n) = number of primes less than or equal to n. Repeating n = Li(n), n will reach 1 in a finite number of steps.
%o (PARI) Li(x) = -eint1(-log(x))
%o pr2nLi(n) = my(c); for(x=1,n, y=2^x; c=0; p=y; while(p > 1,p = floor(Li(p));c++); print(x" "c","))
%K easy,nonn
%O 1,2
%A _Cino Hilliard_, Mar 16 2004