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.

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

Original entry on oeis.org

1, 2, 2, 4, 4, 12, 19, 30, 43, 102, 159, 340, 537, 1146, 1914, 3992, 6378, 14010, 23145, 49682, 82295, 180016, 303833, 654049, 1098521, 2387358, 4075501, 8820563, 15062515, 32732736, 56401388, 121964573, 210680037
Offset: 1

Views

Author

Antti Karttunen, Jun 04 2004

Keywords

Comments

Ratios a(n)/A036378(n) converge as: 1, 1, 1, 0.8, 0.571429, 0.923077, 0.826087, 0.697674, 0.573333, 0.744526, 0.623529, 0.732759, 0.615826, 0.710918, 0.631683, 0.699247, 0.593358, 0.687102, 0.599068, 0.675156, 0.586414, 0.671161, 0.591451, 0.663458, 0.579964, 0.654834, 0.579953, 0.650393, 0.574745, 0.645647, 0.574454, 0.640787, 0.570449
Ratios a(n)/A095020(n) converge as: 1, 1, 1, 1, 0.8, 1.2,1.1875, 0.9375, 0.895833, 1.051546, 0.908571, 1.017964, 1.015123,1.014159, 1.034595, 1.009866, 1.016252, 1.007117, 0.99557, 1.002381,1.008245, 1.006182, 1.011728, 1.005142, 1.006148, 1.002926, 1.00328,1.004575, 1.002721, 1.003502, 1.004757, 1.002787, 1.003766

Crossrefs

a(n) = A036378(n)-A095328(n).

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

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

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 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
Offset: 1

Views

Author

Antti Karttunen, Jun 04 2004

Keywords

Comments

Differs from primes (A000040) first time at n=11, where a(11)=37, while A000040(11)=31, as 31 whose binary expansion is 11111, with five 1 bits and no 0 bits is the first prime excluded from this sequence. Note that 15 (1111 in binary) is not prime.

Crossrefs

Complement of A095322 in A000040. Subset of A095285. subset: A095319. Cf. A095325.

Programs

  • Mathematica
    Select[Prime[Range[100]],DigitCount[#,2,1]<(5+DigitCount[#,2,0])&] (* Harvey P. Dale, Dec 09 2015 *)
  • 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 <= (4+b0), return(1);, return(0););};
    forprime(x = 2, 293, if(B(x), print1(x, ", "); ); ); \\ Washington Bomfim, Jan 12 2011
Showing 1-4 of 4 results.