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

A118958 Primes that cannot be written as 2^k + p with p prime < 2^k.

Original entry on oeis.org

2, 3, 5, 17, 31, 41, 47, 53, 59, 73, 79, 89, 97, 103, 109, 113, 127, 137, 149, 163, 167, 173, 179, 191, 193, 197, 223, 227, 233, 239, 251, 257, 271, 277, 281, 283, 307, 311, 313, 331, 337, 347, 349, 367, 373, 379, 389, 397, 401, 409, 421, 431, 433, 439, 443
Offset: 1

Views

Author

Reinhard Zumkeller, May 07 2006

Keywords

Comments

A118953(A049084(a(n))) = 0; A065381 is a subsequence.

Crossrefs

Programs

  • Maple
    filter:= proc(n) not isprime(n-2^ilog2(n)) end proc:
    select(filter, [seq(ithprime(i),i=1..100)]); # Robert Israel, Jan 27 2021
  • Mathematica
    okQ[n_] := !PrimeQ[n-2^(Length[IntegerDigits[n, 2]]-1)];
    Select[Prime[Range[100]], okQ] (* Jean-François Alcover, Feb 04 2023 *)

A065380 Primes of the form p + 2^k, p prime and k >= 0.

Original entry on oeis.org

3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 131, 137, 139, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 257, 263, 269, 271, 277, 281, 283, 293
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 03 2001

Keywords

Examples

			a(3) = 11 = 3 + 2^3 = 7 + 2^2.
		

Crossrefs

Programs

  • Haskell
    a065380 n = a065380_list !! (n-1)
    a065380_list = filter f a000040_list where
       f p = any ((== 1) . a010051 . (p -)) $ takeWhile (<= p) a000079_list
    -- Reinhard Zumkeller, Nov 24 2011
  • Mathematica
    With[{upto=300},Select[Union[Select[Flatten[Outer[Plus,Prime[Range[ PrimePi[upto]]],2^Range[0,Floor[Log[2,upto]]]]],PrimeQ]],#<=upto&]] (* Harvey P. Dale, Feb 28 2012 *)

Formula

A078687(A049084(a(n))) > 0; A091932 is a subsequence. - Reinhard Zumkeller, May 07 2006

A118953 Number of ways to write the n-th prime as 2^k + p, where p is prime and p < 2^k.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Reinhard Zumkeller, May 07 2006

Keywords

Comments

0 <= a(n) <= 1, a(n) <= A078687(n);
a(A049084(A118958(n))) = 0, a(A049084(A091932(n))) = 1;
a(n) = A118952(A000040(n)).

A091931 Change the first bit to 0 in binary notation for the n-th prime.

Original entry on oeis.org

0, 1, 1, 3, 3, 5, 1, 3, 7, 13, 15, 5, 9, 11, 15, 21, 27, 29, 3, 7, 9, 15, 19, 25, 33, 37, 39, 43, 45, 49, 63, 3, 9, 11, 21, 23, 29, 35, 39, 45, 51, 53, 63, 65, 69, 71, 83, 95, 99, 101, 105, 111, 113, 123, 1, 7, 13, 15, 21, 25, 27, 37, 51, 55, 57, 61, 75, 81, 91, 93, 97, 103
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 14 2004

Keywords

Comments

a(n) = A053645(A000040(n)).

Crossrefs

Cf. A091932.

Programs

  • Mathematica
    FromDigits[Rest[IntegerDigits[#,2]],2]&/@Prime[Range[80]] (* Harvey P. Dale, Apr 20 2012 *)
  • PARI
    for(n=1,72,p=prime(n);p-=2^(#binary(p)-1);print1(p,", ")) \\ Washington Bomfim, Jan 18 2011

Formula

a(n) = A000040(n) - 2^(A035100(n)-1).

A152084 Primes p such that p + 2^floor(log_2(p)) is prime.

Original entry on oeis.org

3, 7, 11, 31, 41, 47, 67, 73, 103, 109, 127, 149, 179, 239, 251, 307, 313, 331, 337, 397, 421, 463, 487, 521, 557, 617, 641, 659, 701, 719, 809, 887, 911, 941, 947, 971, 977, 1019, 1039, 1063, 1087, 1117, 1129, 1213, 1249, 1327, 1399, 1423, 1453, 1567, 1597
Offset: 1

Views

Author

Leroy Quet, Nov 23 2008

Keywords

Comments

a(n) + 2^floor(log_2(a(n))) = A152085(n).
If a(n) is written in binary and the leftmost 1 is replaced with "10", then we would have the binary representation of A152085(n), which is a prime.
Sequence A091932 contains the related primes p where p - 2^floor(log_2(p)) = prime.

Crossrefs

Programs

  • Maple
    filter:= n -> isprime(n) and isprime(n + 2^ilog2(n)):
    select(filter, [seq(i,i=3..10000,2)]); # Robert Israel, Mar 14 2024

Extensions

Extended by Ray Chandler, Nov 26 2008

A191235 Primes p such that the binary representation of p is the concatenation of the binary representations of prime 2 and an odd prime.

Original entry on oeis.org

11, 23, 43, 83, 181, 353, 359, 383, 643, 661, 691, 709, 739, 751, 1301, 1307, 1361, 1373, 1433, 1481, 1487, 1511, 1523, 2617, 2647, 2689, 2707, 2731, 2749, 2767, 2791, 2857, 2887, 3001, 3019, 3061, 3067, 5147, 5189, 5297, 5309, 5333, 5387, 5393
Offset: 1

Views

Author

Juri-Stepan Gerasimov, May 27 2011

Keywords

Comments

The odd primes arising in computing the sequence are 3, 7, 11, 19, 53, 97, 103, 127, 131, 149, 179, 197, 227, 239, ...
Primes whose binary representation equals the binary representation of some prime preceded by 10. - Klaus Brockhaus, May 29 2011

Examples

			11 is in the sequence because 11, 2, 3 in binary are resp. 1011, 10, 11.
83 is in the sequence because 83, 2, 19 in binary are resp. 1010011, 10, 10011.
		

Crossrefs

Programs

  • Magma
    [ p: p in PrimesInInterval(3, 6100) | exists(q){ k: k in PrimesUpTo(p div 3) | Intseq(p, 2) eq Intseq(k, 2) cat [0, 1] } ]; // Klaus Brockhaus, May 29 2011
  • PARI
    A053644(n)=my(k=1);while(k<=n,k<<=1);k>>1;
    forprime(p=2,1e3,if(isprime(k=4*A053644(p)+p),print1(k", "))) \\ Charles R Greathouse IV, May 27 2011
    

Extensions

a(4) corrected, a(15)-a(56) added by Charles R Greathouse IV, May 27 2011

A188677 Primes p such that the minimum value of |p-2^x|, x>0, is also a prime.

Original entry on oeis.org

11, 13, 19, 23, 29, 37, 43, 53, 59, 61, 67, 71, 83, 97, 109, 131, 139, 151, 157, 181, 197, 227, 233, 239, 251, 263, 269, 293, 317, 353, 359, 383, 409, 433, 439, 499, 509, 523, 541, 571, 601, 613, 619, 643, 661, 691, 709, 739, 751, 773, 797, 827, 857
Offset: 1

Views

Author

Keywords

Comments

Originally submitted by Benoit Cloitre, Dec 17 2002 as A078686 and corrected by Robert G. Wilson v, Apr 08 2011.

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Block[{x = Floor@ Log2@ n}, PrimeQ@ Min[n - 2^x, 2^(x+1) - n]]; Select[ Prime@ Range@ 150, fQ] (* Robert G. Wilson v, Apr 08 2011 *)
  • PARI
    is(n)=if(isprime(n),my(x=log(n)\log(2));isprime(min(abs(n-1<Charles R Greathouse IV, Jan 10 2013

Formula

Intersection of A086081 and A091932. - Robert G. Wilson v, May 27 2011
Showing 1-7 of 7 results.