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

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

A228021 Prime(k) such that 2^(k - 1) + prime(k) is also prime.

Original entry on oeis.org

2, 3, 29, 89, 251, 659, 937, 1307, 1453, 8179, 9391, 12097, 28499, 83969, 101209, 120739, 730993
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 03 2013

Keywords

Comments

The primes indices k are 1, 2, 10, 24, 54, 120, 159, 214, 231, 1027, 1161, 1447, 3100, 8188, 9695, 11363 ...
The corresponding primes 2^(k - 1) + prime(k) are 3, 5, 541, 8388697,...
a(18) > 2*10^6. - Michael S. Branicky, Apr 16 2025

Examples

			29 is in the sequence because 29 = prime(10) and 2^(10 - 1) + 29 = 512 + 29 = 541 is prime.
		

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 < 730001, 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(9) from _Olivier Gérard_, Aug 01 2013
a(10) - a(15) from Robert G. Wilson v, Aug 01 2013
a(16) from Robert G. Wilson v, Jul 09 2014
a(17) from Michael S. Branicky, Apr 14 2025
Showing 1-2 of 2 results.