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-5 of 5 results.

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

Original entry on oeis.org

0, 1, 0, 3, 3, 5, 4, 21, 32, 69, 96, 229, 335, 768, 1116, 2860, 4371, 10252, 15490, 36563, 58041, 133739, 209875, 491193, 795599, 1816561, 2951789, 6772098, 11144763, 25284670, 41781268, 94895078, 158643268
Offset: 1

Views

Author

Antti Karttunen, Jun 04 2004

Keywords

Comments

Ratios a(n)/A036378(n) converge as: 0, 0.5, 0, 0.6, 0.428571, 0.384615, 0.173913, 0.488372, 0.426667, 0.50365, 0.376471, 0.493534, 0.384174, 0.476427, 0.368317, 0.500963, 0.406642, 0.502795, 0.400932, 0.496874, 0.413586, 0.498624, 0.408549, 0.498259, 0.420036, 0.498269, 0.420047, 0.499347, 0.425255, 0.498736, 0.425546, 0.498567, 0.429551
Ratios a(n)/A095297(n) converge as: 1, 1, 1, 1.5, 1.5, 0.625, 0.571429, 0.954545, 1.185185, 1.014706, 1.2, 0.974468, 0.976676, 0.909953, 0.945763, 1.003861, 0.977197, 1.011245, 1.006694, 0.987575, 0.988538, 0.994512, 0.983496, 0.993061, 0.991634, 0.9931, 0.995506, 0.997392, 0.996345, 0.994955, 0.993649, 0.994285, 0.995042

Crossrefs

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

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

Original entry on oeis.org

3, 7, 11, 13, 23, 29, 31, 43, 47, 53, 59, 61, 79, 103, 107, 109, 127, 151, 157, 167, 173, 179, 181, 191, 199, 211, 223, 227, 229, 233, 239, 241, 251, 311, 317, 347, 349, 359, 367, 373, 379, 383, 431, 439, 443, 461, 463, 467, 479, 487, 491, 499
Offset: 1

Views

Author

Antti Karttunen, Jun 04 2004

Keywords

Examples

			13 is in the sequence because 13 is prime and 13 = 1101_2. '1101' has three 1's and one 0. 3 > 1 + 1. - _Indranil Ghosh_, Feb 07 2017
		

Crossrefs

Complement of A095287 in A000040. Subset of A095070. Subset: A095314. Cf. also A095296.

Programs

  • 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 > (b0+1), return(1);, return(0);); };
    forprime(x = 3, 499, if(B(x), print1(x, ", "); ); );
    \\ Washington Bomfim, Jan 11 2011
    
  • Python
    from sympy import isprime
    i = 1
    j = 1
    while j <= 2000:
        bi = bin(i)[2:]
        if isprime(i) and bi.count("1") > 1 + bi.count("0"):
            print(str(j) + " " + str(i))
            j += 1
        i += 1 # Indranil Ghosh, Feb 07 2017

A095315 Primes in whose binary expansion the number of 1 bits is <= 2 + number of 0 bits.

Original entry on oeis.org

2, 3, 5, 11, 13, 17, 19, 37, 41, 43, 53, 67, 71, 73, 83, 89, 97, 101, 113, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 193, 197, 199, 211, 227, 229, 233, 241, 257, 263, 269, 271, 277, 281, 283, 293, 307, 313, 331, 337, 353, 389, 397
Offset: 1

Views

Author

Antti Karttunen, Jun 04 2004

Keywords

Examples

			13 is in the sequence because 13 = 1101_2. '1101' has three 1's and one 0. 3 = 2 + 1. - _Indranil Ghosh_, Feb 07 2017
		

Crossrefs

Complement of A095314 in A000040. Subset: A095287. Subset of A095319. Cf. also A095335.

Programs

  • Mathematica
    Select[Prime[Range[100]],DigitCount[#,2,1]<3+DigitCount[#,2,0]&] (* Harvey P. Dale, Aug 12 2016 *)
  • 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, 397, if(B(x), print1(x, ", "); ); );
    \\ Washington Bomfim, Jan 12 2011
    
  • Python
    from sympy import isprime
    i=j=1
    while j<=250:
        if isprime(i) and bin(i)[2:].count("1")<=2+bin(i)[2:].count("0"):
            print(str(j)+" "+str(i))
            j+=1
        i+=1 # Indranil Ghosh, Feb 07 2017

A095318 Primes in whose binary expansion the number of 1 bits is > 3 + number of 0 bits.

Original entry on oeis.org

31, 47, 59, 61, 127, 191, 223, 239, 251, 367, 379, 383, 431, 439, 443, 463, 479, 487, 491, 499, 503, 509, 607, 631, 701, 719, 727, 733, 743, 751, 757, 761, 823, 827, 829, 859, 863, 877, 883, 887, 911, 919, 941, 947, 953, 967, 971, 983, 991
Offset: 1

Views

Author

Antti Karttunen, Jun 04 2004

Keywords

Crossrefs

Complement of A095319 in A000040. Subset of A095314. Subset: A095322. Cf. also A095328.

Programs

  • 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 > (3+b0), return(1);, return(0););};
    forprime(x = 2, 991, if(B(x), print1(x, ", "); ); );
    \\ Washington Bomfim, Jan 12 2011

A225222 Primes with more than twice as many 1's as 0's in binary.

Original entry on oeis.org

3, 7, 11, 13, 23, 29, 31, 47, 59, 61, 79, 103, 107, 109, 127, 191, 223, 239, 251, 367, 379, 383, 431, 439, 443, 463, 479, 487, 491, 499, 503, 509, 607, 631, 701, 719, 727, 733, 743, 751, 757, 761, 823, 827, 829, 859, 863, 877, 883, 887, 911, 919, 941, 947, 953, 967, 971
Offset: 1

Views

Author

Keywords

Comments

Naslund proves that this sequence (and related ones) is infinite and gives an asymptotic upper bound.

Crossrefs

Programs

  • Mathematica
    okQ[n_] := Module[{b = IntegerDigits[n, 2]}, Count[b, 1] > 2*Count[b, 0]]; Select[Prime[Range[200]], okQ] (* T. D. Noe, May 02 2013 *)
  • PARI
    has(n)=3*hammingweight(n)>2*#binary(n)
    select(has,primes(500))
Showing 1-5 of 5 results.