OFFSET
1,3
COMMENTS
Ratio a(n)/A036378(n) gives the average asymmetricity ratio for n-bit primes: 0, 0, 1, 0.6, 1.285714, 1.230769, 1.521739, 1.604651, 1.973333, 1.978102, 2.462745, 2.515086, 3.014908, 2.996278, 3.49736, 3.517779, 3.993674, 4.000932, 4.50946, 4.502405, 4.997877, 4.998792, 5.500352, 5.500462, 5.998361, 5.999852, 6.499427, 6.500684, 7.000277, 7.000323, 7.499731, 7.499885, 7.999929, etc. I.e. 2- and 3-bit odd primes are all palindromes, 4-bit primes need on average just a one-bit flip to become palindromes, etc.
Ratio (a(n)/A036378(n))/f(n), where f(n) is (n-1)/4 if n is odd and (n-2)/4 if n is even (i.e. it gives the expected asymmetricity for all odd numbers in range [2^n,2^(n+1)]) converges as follows: 1, 1, 2, 1.2, 1.285714, 1.230769, 1.014493, 1.069767, 0.986667, 0.989051, 0.985098, 1.006034, 1.004969, 0.998759, 0.999246, 1.00508, 0.998418, 1.000233, 1.002102, 1.000535, 0.999575, 0.999758, 1.000064, 1.000084, 0.999727, 0.999975, 0.999912, 1.000105, 1.00004, 1.000046, 0.999964, 0.999985, 0.999991, ...
LINKS
A. Karttunen, 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, which has palindromic binary expansion 11, i.e. A037888(3)=0. a(2)=0, as in range ]4,8] there are two primes 5 (101 in binary) and 7 (111 in binary) so A037888(5) + A037888(7) = 0. a(3)=2, as in range ]8,16] there are two primes, 11 (1011 in binary) and 13 (1101 in binary), thus A037888(11) + A037888(13) = 1+1 = 2.
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 12 2004
STATUS
approved