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

A100362 Primes of the form 2^k - k + 1.

Original entry on oeis.org

2, 2, 3, 13, 59, 65521, 262127, 18014398509481931, 288230376151711687, 1267650600228229401496703205277, 1329227995784915872903807060280344457
Offset: 1

Views

Author

Labos Elemer, Nov 19 2004

Keywords

Comments

The next term has 151 digits. - Stefan Steinerberger, Feb 11 2006

Crossrefs

Programs

  • Magma
    [ a: n in [0..200] | IsPrime(a) where a is 2^n-n+1 ]; // Vincenzo Librandi, Jul 18 2012
    
  • Mathematica
    Select[Table[2^n-n+1,{n,0,500}],PrimeQ] (* Vincenzo Librandi, Jul 18 2012 *)
  • Sage
    def list_a(k):
      return [(2**i) - i + 1 for i in range(k) if (2**i) - i + 1 in Primes()] # Giuseppe Bonaccorso, Aug 15 2019

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 *)

A301744 Numbers k such that 2^k - 2*k + 1 is prime.

Original entry on oeis.org

0, 3, 5, 6, 8, 11, 12, 13, 18, 25, 31, 35, 114, 152, 186, 228, 245, 308, 360, 371, 575, 685, 721, 732, 1361, 2394, 3138, 3446, 5964, 9482, 22793, 51233, 112800, 120491, 199615, 416641
Offset: 1

Views

Author

Vaclav Kotesovec, Mar 26 2018

Keywords

Comments

Terms through 1361 correspond to provable primes; terms beyond 1361 correspond to probable primes.
After 22793, there are no more terms through 40000. - Jon E. Schoenfield, Mar 27 2018
a(37) > 5*10^5. - Robert Price, Jun 01 2018

Crossrefs

Programs

  • Magma
    [n: n in [0..1000] |IsPrime(2^n-2*n+1)]; // Vincenzo Librandi, Mar 27 2018
    
  • Maple
    select(k->isprime(2^k-2*k+1),[$0..3000]); # Muniru A Asiru, Apr 03 2018
  • Mathematica
    Select[Range[0, 1000], PrimeQ[2^# - 2*# + 1] &]
  • PARI
    isok(n) = isprime(2^n-2*n+1); \\ Michel Marcus, Mar 27 2018

Extensions

a(31) from Jon E. Schoenfield, Mar 27 2018
a(32)-a(34) from Robert Price, Apr 03 2018
a(35)-a(36) from Robert Price, Jun 01 2018

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 *)

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