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

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

A078583 Numbers k such that 2^k - prime(k) is prime.

Original entry on oeis.org

3, 11, 19, 24, 26, 61, 96, 175, 189, 312, 483, 741, 4741, 7082, 8421, 10695, 14802, 18824, 18892, 20655, 21653, 39937, 84160
Offset: 1

Views

Author

Robert G. Wilson v, Nov 30 2002

Keywords

Comments

a(23) is greater than 50000 - Sam Handler (sam_5_5_5_0(AT)yahoo.com), Dec 05 2004
a(24) is greater than 200000. - Michael S. Branicky, Jan 03 2025

Crossrefs

Corresponding prime(k) are in A078686.
Cf. A077375.

Programs

  • Mathematica
    Do[ If[ PrimeQ[2^n - Prime[n]], Print[n]], {n, 1, 10^5}]

Extensions

a(14)-a(22) from Sam Handler (sam_5_5_5_0(AT)yahoo.com), Dec 05 2004
a(23) from Michael S. Branicky, Dec 31 2024

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

A227126 Primes prime(k) such that 2^(k+1) - prime(k) is also prime.

Original entry on oeis.org

2, 3, 5, 11, 17, 167, 193, 197, 433, 4111, 9173, 42929, 95279, 98897, 139409, 142567, 228617, 329333, 344209, 791191, 829177, 1274509, 1284037, 2432791, 2443741
Offset: 1

Views

Author

Gerasimov Sergey, Jul 02 2013

Keywords

Comments

The corresponding primes 2^(k + 1) - prime(k) are 2, 5, 11, 53, 239, 1099511627609, 35184372088639, ...
The prime indices k are 1, 2, 3, 5, 7, 39, 44, 45, 84, 566, 1137, ...

Examples

			5 is a term because 5 is the 3rd prime, and 2^(3+1) - 5 = 16 - 5 = 11 which is a prime
11 is in the sequence because 11 = prime(5) and 2^(5 + 1) - 11 = 64 - 11 = 53 is a prime.
		

Crossrefs

Programs

  • Mathematica
    p = 2; lst = {}; While[p < 850001, If[ PrimeQ[ 2^(PrimePi@ p +1) - p], AppendTo[lst, p]; Print@ p]; p = NextPrime@ p]; lst (* Robert G. Wilson v, Jul 09 2014 *)
  • PARI
    lista(nn) = {ip = 1; forprime(p=2, nn, if (isprime(2^(ip+1)-p), print1(p, ", ")); ip++;);} \\ Michel Marcus, Jul 12 2014

Extensions

a(3), a(6), a(8)-a(12) from Joerg Arndt, Jul 03 2013
Corrected and extended through a(21) by Robert G. Wilson v, Jul 09 2014
Entry revised by N. J. A. Sloane, Jan 02 2019, incorporating data from a later submission from Robert G. Wilson v
a(22)-a(25) from Michael S. Branicky, May 31 2025

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

Original entry on oeis.org

11, 13, 17, 19, 23, 37, 61, 233, 257, 1553, 2879, 4919, 6389, 7621, 8081, 35593, 37951, 96263, 206419, 596803, 1202837, 2837851
Offset: 1

Views

Author

Robert G. Wilson v, Jul 09 2014

Keywords

Comments

a(22) > 1211303. - J.W.L. (Jan) Eerland, Dec 08 2022
a(23) > 3000000. - Michael S. Branicky, Jun 03 2025

Crossrefs

Programs

  • Maple
    for i from 1 do
        p := ithprime(i) ;
        if isprime(2^(numtheory[pi](p-1))-p) then
            printf("%d,\n",p) ;
        end if;
    end do: # R. J. Mathar, Jul 11 2014
  • Mathematica
    p = 2; lst = {}; While[p < 800001, If[ PrimeQ[ 2^(PrimePi@ p-1) - p], AppendTo[lst, p]; Print@ p]; p = NextPrime@ p]; lst
    n=1;Monitor[Parallelize[While[True,If[PrimeQ[2^(PrimePi[Prime[n]-1])-Prime[n]],Print[Prime[n]]];n++];n],n] (* J.W.L. (Jan) Eerland, Dec 08 2022 *)
  • PARI
    is(n)=isprime(n) && isprime(2^primepi(n-1)-n) \\ Charles R Greathouse IV, Feb 25 2017

Formula

{p in A000040: 2^[A000720(p-1)]-p in A000040}. - R. J. Mathar, Jul 11 2014

Extensions

a(21) from J.W.L. (Jan) Eerland, Dec 08 2022
a(22) from Michael S. Branicky, Jun 02 2025

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

Original entry on oeis.org

3, 31, 71, 97, 107, 277, 307, 641, 907, 967, 1009, 1447, 3463, 3527, 7757, 8167, 250867, 279047, 1107791, 1176671, 1538399, 1594909, 2450017
Offset: 1

Views

Author

Robert G. Wilson v, Jul 09 2014

Keywords

Crossrefs

Programs

  • Maple
    for i from 1 do
            p := ithprime(i) ;
            if isprime(p+2^(i+1)) then
                    printf("%d,\n",p) ;
            end if;
    end do: # R. J. Mathar, Jul 12 2014
  • Mathematica
    p = 2; lst = {}; While[p < 900000, If[ PrimeQ[ 2^(PrimePi@ p +1) + p], AppendTo[lst, p]; Print@ p]; p = NextPrime@ p]; lst
  • PARI
    lista(nn) = {ip = 1; forprime(p=2, nn, if (isprime(2^(ip+1)+p), print1(p, ", ")); ip++;);} \\ Michel Marcus, Jul 12 2014

Extensions

a(19)-a(23) from Michael S. Branicky, May 31 2025

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

A244917 Smallest prime p such that p - 2^e is also prime in exactly n cases for nonnegative integers e.

Original entry on oeis.org

2, 3, 7, 19, 139, 829, 3331, 32941, 176417, 854929, 2233531, 12699571, 47924959, 763597201, 5775760189
Offset: 0

Views

Author

Robert G. Wilson v, Jul 09 2014

Keywords

Comments

The exponent e is obviously limited to 0 <= e <= log_2(p).
The sequence is obtained by building a greedy prime index inverse of A078687, which is 1, 2, 4, 8, 34, ..., followed by lookup in the primes, A000040.
From Robert G. Wilson v, Sep 12 2014: (Start)
0: 2, 127, 149, 251, 331, 337, 373, 509, 599, 701, 757, …, ;
1: 3, 5, 17, 29, 41, 53, 59, 89, 97, 137, 163, 179, 191, …, ;
2: 7, 11, 13, 23, 31, 37, 43, 47, 67, 71, 73, 79, 101, …, ;
3: 19, 61, 83, 131, 167, 227, 229, 241, 271, 293, 353, …, ;
4: 139, 181, 199, 571, 601, 619, 677, 691, 1217, 1231, …, ;
5: 829, 1487, 2131, 2341, 2551, 2971, 4051, 4261, 4583, …, ;
6: 3331, 12109, 14551, 17393, 22279, 22307, 22741, …, ;
7: 32941, 34369, 44029, 49433, 67189, 95717, 99833, …, ;
8: 176417, 304771, 314723, 314779, 349667, 414707, …, ;
9: 854929, 1297651, 1328927, 1784723, 2164433, 2488909, …, ;
10: 2233531, 6026089, 7475389, 7623229, 9644911, …, ;
11: 12699571, 18464123, 52849879, 78127339, 79303579, …, ;
12: 47924959, 153309649, 204797059, 248685923, 273865219, …, ;
13: 763597201, 1194032507, 1522018741, 1833343669, …, ;.
(End)

Examples

			a(3) = 19 since 19-2^1=17, 19-2^3=11 & 19-2^4=3 and there exists no prime less than 19 which exhibits this characteristic.
		

Crossrefs

Cf. A078686.

Programs

  • Mathematica
    f[n_] := Length@ Table[q = p - 2^exp; If[ PrimeQ@ q, {q}, Sequence @@ {}], {exp, 0, Floor@ Log2@ p}]; t = Table[0, {20}]; p = 2; While[p < 100000001, a = f@ p; If[ t[[a]] == 0, t[[a]] = p; Print[{a, p}]]; p = NextPrime@ p]; t

Extensions

a(14) from Robert G. Wilson v, Sep 12 2014
Showing 1-8 of 8 results.