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.

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

Original entry on oeis.org

0, 0, 0, 1, 3, 1, 4, 13, 32, 35, 96, 124, 335, 466, 1116, 1717, 4371, 6380, 15490, 23904, 58041, 88200, 209875, 331769, 795599, 1258386, 2951789, 4741344, 11144763, 17964801, 41781268, 68371012, 158643268
Offset: 1

Views

Author

Antti Karttunen, Jun 04 2004

Keywords

Comments

Ratios a(n)/A036378(n) converge as: 0, 0, 0, 0.2, 0.428571, 0.076923, 0.173913, 0.302326, 0.426667, 0.255474, 0.376471, 0.267241, 0.384174, 0.289082, 0.368317, 0.300753, 0.406642, 0.312898, 0.400932, 0.324844, 0.413586, 0.328839, 0.408549, 0.336542, 0.420036, 0.345166, 0.420047, 0.349607, 0.425255, 0.354353, 0.425546, 0.359213, 0.429551
Ratios a(n)/A095055(n) converge as: 1, 1, 1, 1, 1.5, 0.333333, 0.571429, 1.181818, 1.185185, 0.875, 1.2, 0.953846, 0.976676, 0.966805, 0.945763, 0.97779, 0.977197, 0.98472, 1.006694, 0.995088, 0.988538, 0.987616, 0.983496, 0.990015, 0.991634, 0.994496, 0.995506, 0.991599, 0.996345, 0.993681, 0.993649, 0.995067, 0.995042

Crossrefs

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

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

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

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 37, 41, 43, 53, 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, 307, 311
Offset: 1

Views

Author

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 5 1-bits and no 0 bits is the first prime excluded from this sequence. - Jun 04 2004

Crossrefs

Complement of A095318 in A000040. Subset of A095323, subset: A095315. A095329.

Programs

  • Mathematica
    Select[Prime[Range[70]],DigitCount[#,2,1]Harvey P. Dale, Feb 22 2020 *)
  • 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, 311, if(B(x), print1(x, ", "); ); );
    \\ Washington Bomfim, Jan 12 2011

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

Original entry on oeis.org

31, 127, 191, 223, 239, 251, 367, 379, 383, 431, 439, 443, 463, 479, 487, 491, 499, 503, 509, 751, 863, 887, 983, 991, 1013, 1019, 1021, 1151, 1277, 1279, 1399, 1439, 1471, 1487, 1499, 1511, 1523, 1531, 1663, 1723, 1759, 1783, 1787, 1789, 1823
Offset: 1

Views

Author

Antti Karttunen, Jun 04 2004

Keywords

Crossrefs

Complement of A095323 in A000040. Subset of A095318. Subset: A095284. Cf. also A095324.

Programs

  • Mathematica
    btsQ[n_]:=Module[{idn2=IntegerDigits[n,2]},Count[idn2,1]>4+Count[ idn2,0]]; Select[Prime[Range[300]],btsQ] (* Harvey P. Dale, Nov 12 2011 *)
  • 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, 1823, if(B(x), print1(x, ", "); ); ); \\ Washington Bomfim, Jan 12 2011
Showing 1-4 of 4 results.