cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-4 of 4 results.

A095298 Sum of 1-bits between the most and least significant bits summed for all primes in range ]2^n,2^(n+1)].

Original entry on oeis.org

0, 1, 2, 8, 15, 30, 67, 154, 302, 611, 1280, 2546, 5207, 10447, 21123, 42783, 85726, 173102, 347243, 698544, 1401784, 2813930, 5644165, 11328192, 22712057, 45538473, 91288241, 182965151, 366691833, 734702678, 1471976078, 2948741819
Offset: 1

Views

Author

Antti Karttunen, Jun 04 2004

Keywords

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.

Examples

			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

A095297, A095334. Cf. also A095353 (similar sums and ratios computed in Fibonacci number system).

A095314 Primes in whose binary expansion the number of 1 bits is > 2 + number of 0 bits.

Original entry on oeis.org

7, 23, 29, 31, 47, 59, 61, 79, 103, 107, 109, 127, 191, 223, 239, 251, 311, 317, 347, 349, 359, 367, 373, 379, 383, 431, 439, 443, 461, 463, 467, 479, 487, 491, 499, 503, 509, 607, 631, 701, 719, 727, 733, 743, 751, 757, 761, 823, 827, 829, 859
Offset: 1

Views

Author

Antti Karttunen, Jun 04 2004

Keywords

Crossrefs

Complement of A095315 in A000040. Subset of A095286. Subset: A095318. Cf. also A095334.

Programs

  • Maple
    f:= proc(n) local L,d,s;
        if not isprime(n) then return false fi;
        L:= convert(n,base,2);
        convert(L,`+`) > nops(L)/2+1
    end proc:
    select(f, [seq(i,i=3..1000,2)]); # Robert Israel, Oct 26 2023
  • Mathematica
    n1Q[p_]:=Module[{be=IntegerDigits[p,2]},Total[be]>2+Count[be,0]]; Select[ Prime[ Range[150]],n1Q] (* Harvey P. Dale, Oct 26 2022 *)
  • PARI
    B(x) = { nB = floor(log(x)/log(2)); b1 = 0; b0 = 0;
    for(i = 0, nB, if(bittest(x,i), b1++;, b0++;); );
    if(b1 > (2+b0), return(1);, return(0););};
    forprime(x = 2, 859, if(B(x), print1(x, ", "); ); );
    \\ Washington Bomfim, Jan 12 2011

A095297 Number of A095287-primes in range ]2^n,2^(n+1)].

Original entry on oeis.org

0, 1, 0, 2, 2, 8, 7, 22, 27, 68, 80, 235, 343, 844, 1180, 2849, 4473, 10138, 15387, 37023, 58714, 134477, 213397, 494625, 802311, 1829183, 2965114, 6789809, 11185644, 25412867, 42048314, 95440507, 159433693
Offset: 1

Views

Author

Antti Karttunen, Jun 04 2004

Keywords

Comments

Ratios a(n)/A036378(n) converge as: 0, 0.5, 0, 0.4, 0.285714, 0.615385, 0.304348, 0.511628, 0.36, 0.49635, 0.313725, 0.506466, 0.393349, 0.523573, 0.389439, 0.499037, 0.416132, 0.497205, 0.398266, 0.503126, 0.418382, 0.501376, 0.415405, 0.501741, 0.42358, 0.501731, 0.421943, 0.500653, 0.426814, 0.501264, 0.428266, 0.501433, 0.431691
Ratios a(n)/A095334(n) converge as: 1, 1, 1, 0.666667, 0.666667, 1.6, 1.75, 1.047619, 0.84375, 0.985507, 0.833333, 1.026201,1.023881, 1.098958, 1.057348, 0.996154, 1.023336, 0.98888, 0.993351,1.012581, 1.011595, 1.005518, 1.016781, 1.006987, 1.008436, 1.006948,1.004514, 1.002615, 1.003668, 1.00507, 1.006392, 1.005748, 1.004982

Crossrefs

a(n) = A036378(n)-A095296(n). Cf. A095298.

A095335 Number of A095315-primes in range ]2^n,2^(n+1)].

Original entry on oeis.org

1, 1, 2, 2, 4, 8, 19, 22, 43, 68, 159, 235, 537, 844, 1914, 2849, 6378, 10138, 23145, 37023, 82295, 134477, 303833, 494625, 1098521, 1829183, 4075501, 6789809, 15062515, 25412867, 56401388, 95440507, 210680037
Offset: 1

Views

Author

Antti Karttunen, Jun 04 2004

Keywords

Comments

Ratios a(n)/A036378(n) converge as: 1, 0.5, 1, 0.4, 0.571429, 0.615385, 0.826087, 0.511628, 0.573333, 0.49635, 0.623529, 0.506466, 0.615826, 0.523573, 0.631683, 0.499037, 0.593358, 0.497205, 0.599068, 0.503126, 0.586414, 0.501376, 0.591451, 0.501741, 0.579964, 0.501731, 0.579953, 0.500653, 0.574745, 0.501264, 0.574454, 0.501433, 0.570449
Ratios a(n)/A095296(n) converge as: 1, 1, 1, 0.666667, 0.8,1.6, 1.1875, 1.047619, 0.895833, 0.985507, 0.908571, 1.026201,1.015123, 1.098958, 1.034595, 0.996154, 1.016252, 0.98888, 0.99557,1.012581, 1.008245, 1.005518, 1.011728, 1.006987, 1.006148, 1.006948,1.00328, 1.002615, 1.002721, 1.00507, 1.004757, 1.005748, 1.003766

Crossrefs

a(n) = A036378(n)-A095334(n).
Showing 1-4 of 4 results.