OFFSET
1,3
COMMENTS
Ratio a(n)/A036378(n) (i.e. average number of 1-bits in range ]most significant bit,least significant bit[ of primes p which 2^n < p < 2^(n+1)) grows as: 0, 0.5, 1, 1.6, 2.142857, 2.307692, 2.913043, 3.581395, 4.026667, 4.459854, 5.019608, 5.487069, 5.97133, 6.480769, 6.971287, 7.493957, 7.975254, 8.489554, 8.987783, 9.492893, 9.98877, 10.491283, 10.987107, 11.49116, 11.990823, 12.490859, 12.990533, 13.491108, 13.991985, 14.491881, 14.992221, 15.492331, 15.992713.
Ratio of that average compared to (n-1)/2 (the expected value of that same sum computed for all odd numbers in the same range) converges as: 1, 1, 1, 1.066667, 1.071429, 0.923077, 0.971014, 1.023256, 1.006667, 0.991079, 1.003922, 0.997649, 0.995222, 0.997041, 0.995898, 0.999194, 0.996907, 0.998771, 0.998643, 0.999252, 0.998877, 0.99917, 0.998828, 0.999231, 0.999235, 0.999269, 0.999272, 0.999341, 0.999427, 0.99944, 0.999481, 0.999505, 0.999545.
LINKS
A. Karttunen and J. Moyer: C-program for computing the initial terms of this sequence
EXAMPLE
a(1)=0, as only prime in range ]2,4] is 3, 11 in binary which has no space between its most and least significant bits. a(2)=1, as in that range there are two primes 5 (101 in binary) and 7 (111 in binary) and summing their middle bits we get 1. a(3)=2, as there are again two primes, 11 (1011 in binary) and 13 (1101 in binary) and summing the bits in the middle we get total 2.
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 04 2004
STATUS
approved