OFFSET
1,1
COMMENTS
The number of steps for the recurrence in this sequence stopping at 1 compares closely to the steps in the pi(n) recurrence stopping at 0. If we define Li(1) = 0 and allow that step then A(using Li seq#) - A(using pi seq#) = 1 for n <=13. So one may conjecture the steps in the Li method is always 1 greater than the steps in the pi method. Question is can the difference be greater than 1? For the largest value allowed in the link (3*10^13) A(Li) = 17 (assuming L1(1)= 0) and n=13 A(pi) = 16 from Booker so the difference = 1 as before.
LINKS
Andrew Booker, The Nth Prime Page.
FORMULA
Li(n) = logarithmic integral = integral(x=2..n, dx/log(x)). This gives a very good approximation to the number of primes less than or equal to n. By repeating n=Li(n), n will reach 1 in a finite number of steps.
EXAMPLE
Li(100) = 30
Li(30) = 13
Li(13) = 7
Li(7) = 4
Li(4) = 2
Li(2) = 1
Total steps to reach 1 = 6. Thus 6 is the 2nd entry in the sequence corresponding to n=2.
PROG
(PARI) Li(x)=-eint1(-log(x))
pr10nLi(n) = my(c); for(x=1, n, y=10^x; c=0; p=y; while(p > 1, p = floor(Li(p)); c++; ); print1(c", "))
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Mar 16 2004
STATUS
approved