|
Search: id:A091987
|
|
|
| A091987 |
|
Number of steps required for initial p = 2^n to reach 0 in the recurrence p = pi(p). |
|
+0 1
|
|
| 1, 2, 3, 4, 5, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13
(list; graph; listen)
|
|
|
OFFSET
|
0,2
|
|
|
LINKS
|
Andrew Booker, The Nth Prime Page.
|
|
FORMULA
|
pi(n) = number of primes less than or equal to n. By repeating n=pi(n), n will reach 0 in a finite number of steps.
|
|
EXAMPLE
|
Pi(32) = 11
Pi(11) = 5
Pi(5) = 3
Pi(3) = 2
Pi(2) = 1
Pi(1) = 0
Total steps to reach 0 = 6. Thus 6 is the 6th entry in the sequence corresponding to n=5.
|
|
PROGRAM
|
(PARI) pr2n(n) = { local c; for(x=0, n, y=2^x; c=0; p=y; while(p, p = pi(p); c++); print1(c", ") ) } pi(n) = { local ct; ct=0; forprime(x=1, n, ct++); return(ct) \pi(x) prime count function
|
|
CROSSREFS
|
Sequence in context: A069754 A097622 A110010 this_sequence A025544 A121856 A132172
Adjacent sequences: A091984 A091985 A091986 this_sequence A091988 A091989 A091990
|
|
KEYWORD
|
hard,nonn
|
|
AUTHOR
|
Cino Hilliard (hillcino368(AT)gmail.com), Mar 16 2004
|
|
|
Search completed in 0.002 seconds
|