|
Search: id:A166079
|
|
|
| A166079 |
|
Given a row of n pay-phones, all initially unused, how many people can use the pay-phones, assuming (1) each always chooses one of the most distant pay-phones from those in use already, (2) the first person takes a phone at the end, and (3) no people use adjacent phones? |
|
+0 1
|
|
| 1, 1, 2, 2, 3, 3, 3, 4, 5, 5, 5, 5, 5, 6, 7, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 11, 12, 13, 14, 15, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33
(list; graph; listen)
|
|
|
OFFSET
|
1,3
|
|
|
LINKS
|
Randall Munroe, Urinal protocol vulnerability
|
|
FORMULA
|
a(n) = 1 + 2^floor(lg(n-2) - 1) + max(0, n - 3/2 * 2^floor(lg(n-2)) - 1)
|
|
PROGRAM
|
(PARI) A000523(n)={my(t=floor(sizedigit(n)*3.32192809)-5); n>>=t; while(n>3, n>>=2; t+=2); if(n==1, t, t+1)}; a(n)={my(t=1<<(A000523(n-2)-1)); max(t+1, n-t-t)}
|
|
CROSSREFS
|
A095236, A095912, A095240
Sequence in context: A085578 A135646 A101646 this_sequence A080677 A153112 A005350
Adjacent sequences: A166076 A166077 A166078 this_sequence A166080 A166081 A166082
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
Charles R Greathouse IV (charles.greathouse(AT)case.edu), Oct 06 2009
|
|
|
Search completed in 0.002 seconds
|