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.

A268209 Numbers n of the form 2^k + 1 such that n - k is a prime q (for k >= 0).

Original entry on oeis.org

2, 3, 5, 17, 65, 65537, 262145, 18014398509481985, 288230376151711745, 1267650600228229401496703205377, 1329227995784915872903807060280344577
Offset: 1

Views

Author

Jaroslav Krizek, Jan 28 2016

Keywords

Comments

Subsequence of A000051.
Prime terms are in A268210: 2, 3, 5, 17, 65537, ...
Corresponding values of numbers k are in A100361 (numbers n such that 2^n-n+1 is prime).
Corresponding values of primes q are in A100362 (primes of the form 2^n-n+1).
4 out of 5 known Fermat primes (3, 5, 17, 65537) are terms; corresponding values of primes q: 2, 3, 13, 65521.

Examples

			17 = 2^4 + 1 is a term because 17 - 4 = 13 (prime).
257 = 2^8 + 1 is not a term because 257 - 8 = 249 (composite number).
		

Crossrefs

Programs

  • Magma
    [2^k + 1: k in [0..60] | IsPrime(2^k - k + 1)]
  • Mathematica
    2^# + 1 &@ Select[Range[0, 600], PrimeQ[2^# - # + 1] &] (* Michael De Vlieger, Jan 29 2016 *)

Formula

a(n) = A100362(n) + A100361(n).

A268210 Primes p of the form 2^k + 1 such that p - k is a prime q (for k >= 0).

Original entry on oeis.org

2, 3, 5, 17, 65537
Offset: 1

Views

Author

Jaroslav Krizek, Jan 28 2016

Keywords

Comments

Intersection of A092506 and A268209.
Sequence is not the same as A004249 because A004249(5) is a composite number.
Corresponding values of numbers k: 0, 1, 2, 4, 16; corresponding values of primes q: 2, 2, 3, 13, 65521.
4 out of 5 known Fermat primes from A019434 (3, 5, 17, 65537) are terms.

Examples

			Prime 17 = 2^4 + 1 is a term because 17 - 4 = 13 (prime).
257 = 2^8 + 1 is not a term because 257 - 8 = 249 (composite number).
		

Crossrefs

Programs

  • Magma
    [2^k + 1: k in [0..60] | IsPrime(2^k + 1) and IsPrime(2^k - k + 1)];
  • Mathematica
    2^# + 1 &@ Select[Range[0, 600], PrimeQ[2^# + 1] && PrimeQ[2^# - # + 1] &] (* Michael De Vlieger, Jan 29 2016 *)

A239323 Semiprimes of the form (2^n + 1)*(2^n - n + 1).

Original entry on oeis.org

4, 6, 15, 221, 4294049777
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Mar 15 2014

Keywords

Comments

Generated by n: 0, 1, 2, 4, 16, ...
The positions of a(n) in A001358: 1, 2, 6, 75, ...

Examples

			4 is in this sequence because (2^0 + 1)*(2^0 - 0 + 1) = 2*2 = 4 is semiprime for n = 0,
6 is in this sequence because (2^1 + 1)*(2^1 - 1 + 1) = 3*2 = 6 is semiprime for n = 1,
15 is in this sequence because (2^2 + 1)*(2^2 - 2 + 1) = 5*3 = 15 is semiprime for n = 2.
		

Crossrefs

Programs

  • Magma
    k := 1;
         for n in [1..10000] do
            if IsPrime(k*2^n + 1) and IsPrime(k*2^n - n + 1) then
               (k*2^n + 1)*(k*2^n - n + 1);
            end if;
         end for;
  • Mathematica
    Select[Table[(2^n+1)(2^n-n+1),{n,0,20}],PrimeOmega[#]==2&] (* Harvey P. Dale, May 11 2024 *)

A246516 Primes of the form 2*4^n - n.

Original entry on oeis.org

2, 7, 549755813869, 2475880078570760549798248403
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 28 2014

Keywords

Comments

a(5) and a(6) are 125 and 266 decimal digits long, respectively. - Derek Orr, Aug 28 2014

Examples

			2*4^0 - 0 = 2 is prime, thus 2 is a member of this sequence.
		

Crossrefs

Programs

  • Magma
    [a: n in [0..500] | IsPrime(a) where a is 2*4^n - n];
    
  • Mathematica
    Select[Table[2^(2n + 1) - n, {n, 0, 127}], PrimeQ] (* Alonso del Arte, Sep 16 2014 *)
  • PARI
    for(n=0,10^3,if(ispseudoprime(2^(2*n+1)-n),print1(2^(2*n+1)-n,", "))) \\ Derek Orr, Aug 28 2014

A308829 Numbers k such that 3^k - k + 1 is prime.

Original entry on oeis.org

0, 1, 5, 27, 45, 47, 75, 8895, 11405, 29517, 84615, 218307
Offset: 1

Views

Author

Giuseppe Bonaccorso, Aug 02 2019

Keywords

Comments

Sieving can be limited to odd values of k, because 3^k - k + 1 is even when k is even. In fact, if k is even, 3^k - k is odd and the successor is even.

Crossrefs

Programs

  • Mathematica
    ListA[k_] := Block[{seq = {}, n = 0, i = 0}, While[Length[seq] < k, {n = 3^i - i + 1, If[PrimeQ[n], AppendTo[seq, i]], i += 1}]; seq]
  • PARI
    isok(k) = isprime(3^k - k + 1); \\ Jinyuan Wang, Aug 03 2019
  • Sage
    def list_a(k):
      return [i for i in range(k) if (3**i) - i + 1 in Primes()]
    
Showing 1-5 of 5 results.