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

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

Original entry on oeis.org

0, 2, 1, 4, 4, 9, 14, 29, 52, 90, 167, 312, 577, 1072, 2026, 3776, 7177, 13585, 25726, 49125, 93569, 178735, 342381, 657180, 1262818, 2430501, 4684999, 9040931, 17470670, 33798206, 65455531, 126889351, 246216909
Offset: 1

Views

Author

Antti Karttunen, Jun 04 2004

Keywords

Comments

As expected, the ratio a(n)/A095292(n) seems to approach 2: 0, 0, 1, 4, 1.33333, 2.25, 1.55556, 2.07143, 2.26087, 1.91489, 1.89773, 2.05263, 1.95593, 1.98519, 2.01793, 1.95344, 2.00924, 1.99633, 1.99287, 2.0083, 2.00075, 1.99746, 1.99841, 1.99971, 2.00034, 2.00001, 2.00018, 1.99977, 1.99971, 1.99997, 2.00004, 1.99995, 2.00003

Crossrefs

a(n) = A036378(n)-A095292(n). Cf. A095005.

Programs

A095282 Primes whose binary-expansion ends with an even number of 1's.

Original entry on oeis.org

2, 3, 11, 19, 43, 47, 59, 67, 79, 83, 107, 131, 139, 163, 179, 191, 211, 227, 239, 251, 271, 283, 307, 331, 347, 367, 379, 419, 431, 443, 463, 467, 491, 499, 523, 547, 563, 571, 587, 619, 643, 659, 683, 691, 719, 739, 751, 787, 811, 827, 859
Offset: 1

Views

Author

Antti Karttunen, Jun 04 2004

Keywords

Crossrefs

Intersection of A000040 & (complement of A079523). Complement of A095283 in A000040. Cf. A027699, A095292.

Programs

  • Maple
    q:= proc(n) local i, l, r; l, r:= convert(n, base, 2), 0;
          for i to nops(l) while l[i]=1 do r:=r+1 od; is(r, even)
        end:
    select(q, [ithprime(i)$i=1..200])[];  # Alois P. Heinz, Dec 15 2019
  • Mathematica
    been1Q[n_]:=Module[{c=Split[IntegerDigits[n,2]][[-1]]},c[[1]]==1&&EvenQ[ Length[ c]]]; Join[{2},Select[Prime[Range[150]],been1Q]] (* Harvey P. Dale, Dec 14 2019 *)
  • PARI
    is(n)=valuation(n+1,2)%2==0 && isprime(n) \\ Charles R Greathouse IV, Oct 09 2013

A231271 Numbers k such that k and k+d are both odious (A000069) or both evil (A001969) for every divisor d of k.

Original entry on oeis.org

1, 5, 7, 9, 13, 17, 23, 29, 31, 37, 41, 49, 53, 61, 71, 73, 85, 89, 97, 101, 103, 109, 113, 119, 125, 127, 129, 133, 137, 149, 151, 157, 167, 173, 181, 193, 197, 199, 217, 223, 229, 233, 241, 249, 257, 263, 269, 277, 281, 293, 311, 313, 317, 321, 325, 337, 341
Offset: 1

Views

Author

Vladimir Shevelev, Nov 06 2013

Keywords

Comments

A prime p is a term iff its binary expansion ends in odd number of 1's (A095283). All terms are in A079523.

Examples

			The odious number k = 341 has divisors {1, 11, 31, 341}. Since the numbers 341 + 1 = 342, 341 + 11 = 352, 341 + 31 = 372, 341 + 341 = 682 are all odious, then 341 is a term.
		

Crossrefs

Programs

  • Mathematica
    odiousQ[n_] := OddQ[DigitCount[n, 2][[1]]];selQ[n_] := Length[Union[Map[odiousQ, Flatten[{n, Map[n+#&, Divisors[n]]}]]]] == 1; Select[Range[200], selQ] (* Peter J. C. Moses, Nov 08 2013 *)
  • PARI
    is(k) = {my(hw = hammingweight(k) % 2); fordiv(k, d, if(hammingweight(k+d) % 2 != hw, return(0))); 1;} \\ Amiram Eldar, Aug 12 2024

Extensions

More terms from Peter J. C. Moses, Nov 08 2013
Showing 1-3 of 3 results.