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.

A078686 Primes prime(k) such that 2^k - prime(k) is also prime.

Original entry on oeis.org

5, 31, 67, 89, 101, 283, 503, 1039, 1129, 2069, 3457, 5641, 45763, 71483, 86599, 112921, 161411, 210173, 211007, 232741, 245269, 479029, 1078589
Offset: 1

Views

Author

Benoit Cloitre, Dec 17 2002

Keywords

Comments

The original definition ("Primes p such that the minimum value of |p-2^x|, x>0, is also a prime") produces A188677, not the terms shown here. - N. J. A. Sloane, Apr 01 2011.
The mystery of this definition was solved by Robert G. Wilson v, Jul 06 2014, who also remarks that if instead we ask for odd primes, and therefore the index is one less than that for all primes, the sequence would begin: 11, 13, 17, 19, 23, 37, 61, 233, 257, 1553, 2879, 4919, 6389, 7621, 8081, 35593, 37951, 96263, 206419, ..., . If we count 1 amongst the primes (A008578), then the sequence would begin: 2, 3, 5, 11, 17, 167, 193, 197, 433, 4111, 9173, 42929, 95279, 98897, 139409, 142567, 228617, ..., .

Examples

			a(1)=5 since 5 is the third prime number and 2^3-5 = 3 is prime. - _Robert G. Wilson v_, Jul 06 2014
		

Crossrefs

Corresponding k are in A078583.

Programs

  • Mathematica
    p = 2; lst = {}; While[p < 760001, If[ PrimeQ[ 2^PrimePi@ p - p], AppendTo[lst, p]; Print@ p]; p = NextPrime@ p]; lst (* Robert G. Wilson v, Jul 06 2014 *)
    Select[Table[{n,Prime[n]},{n,40000}],PrimeQ[2^#[[1]]-#[[2]]]&][[All,2]] (* Harvey P. Dale, Feb 19 2020 *)

Extensions

Edited (corrected title) and extended by Robert G. Wilson v, Jul 06 2014
a(23) from Michael S. Branicky, May 29 2025

A077375 Numbers k such that 2^k + prime(k) is prime.

Original entry on oeis.org

2, 3, 4, 5, 12, 13, 14, 23, 57, 106, 226, 227, 311, 373, 1046, 1298, 1787, 1952, 2130, 2285, 2670, 3254, 3642, 4369, 13559, 33418, 66830, 213810
Offset: 1

Views

Author

Jason Earls, Nov 30 2002

Keywords

Comments

All terms < 5000 correspond to certified primes (Primo 2.2.0 beta). - Ryan Propper, Aug 08 2005

Examples

			2^12 + prime(12) = 4096 + 43 = 4139 is a prime, so 12 is a term.
		

Crossrefs

Corresponding prime(k) are in A242944.

Extensions

a(25)-a(26) from Ryan Propper, Aug 08 2005
a(27) from Henri Lifchitz added by Jason Earls, Jan 12 2008
a(28) from Michael S. Branicky, Jun 01 2025

A242944 Primes prime(k) such that 2^k + prime(k) is also prime.

Original entry on oeis.org

3, 5, 7, 11, 37, 41, 43, 83, 269, 577, 1429, 1433, 2063, 2549, 8353, 10639, 15299, 16927, 18637, 20201, 24007, 30097, 34039, 41777, 146609, 394249, 839203, 2955319
Offset: 1

Views

Author

Robert G. Wilson v, Jun 20 2014

Keywords

Comments

If instead we ask for odd primes, and therefore the index is one less than that for all primes, the sequence would begin: 3, 29, 89, 251, 659, 937, 1307, 1453, 8179, 9391, 12097, 28499, 83969, 101209, 120739, ..., .
If we count 1 amongst the primes (A008578), then the sequence would begin: 1, 3, 31, 71, 97, 107, 277, 307, 641, 907, 967, 1009, 1447, 3463, 3527, 7757, 8167, ..., .

Crossrefs

Corresponding k are in A077375.

Programs

  • Mathematica
    p = 2; lst = {}; While[p < 760001, If[ PrimeQ[p + 2^PrimePi@ p], AppendTo[ lst, p]; Print@ p]; p = NextPrime@ p; c++]; lst
    Select[Table[{n,Prime[n]},{n,3000}],PrimeQ[#[[2]]+2^#[[1]]]&][[;;,2]] (* The program generates the first 21 terms of the sequence. *) (* Harvey P. Dale, Mar 04 2024 *)

Extensions

a(27) from Michael S. Branicky, May 29 2025 using A077375.
a(28) from Michael S. Branicky, Jun 01 2025

A130640 Numbers k such that either 2^k + prime(k) or 2^k - prime(k) is prime.

Original entry on oeis.org

2, 3, 4, 5, 11, 12, 13, 14, 19, 23, 24, 26, 57, 61, 96, 106, 175, 189, 226, 227, 311, 312, 373, 483, 741, 1046, 1298, 1787, 1952, 2130, 2285, 2670, 3254, 3642, 4369, 4741, 7082, 8421, 10695, 13559, 14802, 18824, 18892, 20655, 21653, 33418, 39937, 66830, 84160
Offset: 1

Views

Author

J. M. Bergot, Jun 19 2007

Keywords

Examples

			2^5 + p(5) = 32 + 11 = 43; 43 is prime, hence 5 is in the sequence.
2^11 - p(11) = 2048 - 31 = 2017; 2017 is prime, therefore 11 is in the sequence.
		

Crossrefs

Union of A077375 and A078583.

Programs

  • Mathematica
    Select[Range[2000], PrimeQ[2^# - Prime[ # ]] || PrimeQ[2^# + Prime[ # ]] &]

Extensions

Edited and extended by Stefan Steinerberger, Jun 24 2007
a(45)-a(49) from Michael S. Branicky, May 30 2025

A379694 Numbers k such that 4^k - prime(k) is prime.

Original entry on oeis.org

1, 2, 3, 5, 9, 24, 49, 1466, 4588, 27804, 60126
Offset: 1

Views

Author

Vincenzo Librandi, Dec 30 2024

Keywords

Comments

a(12) > 10^5. - Michael S. Branicky, Jan 02 2025

Examples

			2 in sequence because 4^2 - prime(2) = 16 - 3 = 13 (prime).
4 is not in sequence because 4^4 - prime(4) = 256 - 7 = 249 (not prime).
		

Crossrefs

Programs

  • Magma
    [n: n in [0..1500] | IsPrime(4^n-NthPrime(n))];
  • Mathematica
    Do[If[PrimeQ[4^n-Prime[n]],Print[n]],{n,1,3*10^4}]

Extensions

a(11) from Michael S. Branicky, Jan 01 2025
Showing 1-5 of 5 results.