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.

A052007 Numbers m such that 2^m + m is prime.

Original entry on oeis.org

1, 3, 5, 9, 15, 39, 75, 81, 89, 317, 701, 735, 1311, 1881, 3201, 3225, 11795, 88071, 204129, 678561
Offset: 1

Views

Author

Keywords

Comments

Terms >= 701 are currently only strong pseudoprimes.
If m=1 (mod 6) or m=2 (mod 6) then 3 divides 2^m+m. Thus for n > 1, a(n)!=1 (mod 6) and a(n)!=2 (mod 6).
Some of the results were computed using the PrimeFormGW (PFGW) primality-testing program. - Hugo Pfoertner, Nov 14 2019
Keller (see Links) notes that a Mersenne number M(2^m+m) = 2^(2^m+m) - 1 can be written as (2^m)*2^(2^m) - 1, and lists the first twelve terms of this sequence. The last known case where M(2^m+m) is prime is for m=a(4)=9, which gives the prime M(521). - Jeppe Stig Nielsen, Apr 20 2021

Examples

			2^39 + 39 = 549755813927 is prime.
		

Crossrefs

Programs

  • Mathematica
    Do[ If[ PrimeQ[ 2^n + n ], Print[ n ] ], {n, 0, 7000} ]
    v={1}; Do[If[Mod[n, 2]*(Mod[n, 6]-1)!= 0&&PrimeQ[2^n+n], v=Append[v, n]; Print[v]], {n, 2, 20000}]
  • PARI
    is(n)=isprime(2^n+n) \\ Charles R Greathouse IV, Feb 09 2017

Extensions

11795 from Farideh Firoozbakht, Aug 21 2003
88071 from Hugo Pfoertner, Dec 26 2004
More terms from Henri Lifchitz submitted by Ray Chandler, Mar 02 2007

A187733 Primes of the form 2^n + n + 2.

Original entry on oeis.org

3, 5, 13, 137, 523, 524309, 134217757, 8589934627, 178405961588244985132285746181186892047843477
Offset: 1

Views

Author

Jaroslav Krizek, Jan 19 2013

Keywords

Comments

The list of associated n is: 0, 1, 3, 7, 9, 19, 27, 33, 147, 639, ...
Primes from A052968 of the form 2^(n-1) + n + 1 for n = 1, 2, 4, 8, 10, 20, 28, 34, ...
Pairs of twin primes of forms (2^n+n; 2^n+n+2): (3; 5), (11; 13), (521; 523), ...
The prime number a(10) = 2^639 + 639 + 2 has 193 digits.
a(11) = 2^12243 + 12243 + 2 and a(12) = 2^41427 + 41427 + 2. - Giovanni Resta, Jan 23 2013
The sequence contains the subsequence 13, 137, 524309,... where the n themselves are prime, n = 3, 7, 19 (no further up to 41427). - Jaroslav Krizek, Feb 27 2013

Examples

			8589934627 is in the sequence since 8589934627 =  2^33 + 33 + 2 and 8589934627 is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Table[2^n + n + 2, {n, 60}], PrimeQ[#] &]

A100339 Primes of the form 2^q + q where q is not a prime.

Original entry on oeis.org

3, 521, 32783, 549755813927, 37778931862957161709643, 2417851639229258349412433
Offset: 1

Views

Author

Cino Hilliard, Jan 11 2005

Keywords

Comments

The next term is 2^735+735 = 18073..35103, 222 digits long.

Examples

			For q = 9, 2^9+9 = 521 which is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Table[If[!PrimeQ[n],2^n+n,0],{n,1200}],PrimeQ] (* Vladimir Joseph Stephan Orlovsky, Feb 18 2011*)
  • PARI
    g1(p,n)=for(x=1,n,c=composite(x);y=p^c+c;if(gcd(y,c)==1,if(isprime(y),print1 (y",")))) composite(n) = \ the n-th composite number { local(c,x); c=1; x=0; while(c <= n, x++; if(!isprime(x),c++); ); return(x) }

Formula

a(n) = A006127(A100556(n-1)) for n >= 2. - Amiram Eldar, Jun 30 2024

A237662 Primes of the form 2^(k+l+m+1) - 2^(l+m+1) + 2^(m+1) + l - 2.

Original entry on oeis.org

3, 7, 11, 17, 23, 31, 37, 47, 59, 67, 73, 101, 127, 131, 191, 223, 229, 239, 251, 257, 383, 401, 457, 479, 503, 521, 577, 991, 997, 1019, 1031, 1153, 1601, 1993, 2039, 2053, 2069, 3583, 3593, 3851, 3967, 4079, 4091, 4099, 4111, 4133, 6143, 6211
Offset: 1

Views

Author

Robin Garcia, Feb 11 2014

Keywords

Comments

These prime numbers can be written in the numeral system described in A235860 (perhaps not minimally) this way : 2..21..12..2 (or 1..12..2) k twos followed to the right by l ones, followed to the right by m twos.
k can be zero, with the arbitrary limitation, when k = 0, l <= m.
When k = m = 1 we get primes of the form 2^(l + 2) + l + 2.
It must be noted these primes include the Mersenne primes 3, 7, 31, 127, 8191, ... as well as the Fermat primes 3, 5, 17, 257, 65537, with the exception of 5. Mersenne primes can be represented by a one followed to the right by an even number of twos (if the number of twos is odd, the Mersenne number is divisible by 3) with the exception of 3 represented as 12. The Fermat numbers can be represented with three ones followed to the right by a Mersenne number of twos (2^t - 1 (t = 0, 1, 2, 3, 4, 5,...)) : 3 = 111 instead of shorter 12, 5 = 1112 instead of shorter 21, 17 = 111222, 257 = 1112222222, 65537 = 111222222222222222. The composite (divisible by 641) 2^32 + 1 : three ones followed to the right by thirty one twos. The second Fermat prime: 5, appears in this sequence if we let l > m and l <= 3 when k = 0.
By A235860 3, 7 , 17 and 31 can be represented as 12, 122, 111222, 12222 cases when k=0 (primes of the form 2^(m+1) + l - 2: 31 = 2^5 +1 -2). And 11, 73, 191 as 212, 211122, 2122222 (73 = 2^7 - 2^6 + 2^3 + 3 - 2).

Examples

			For k=l=m=1, 2^(k+l+m+1) - 2^(l+m+1) + 2^(m+1) + l - 2 = 2^4 - 2^3 + 2^2 + 1 - 2 = 16 - 8 + 4 + 1 - 2 = 11, so 11 is in the sequence.
		

Crossrefs

Programs

  • PARI
    n=10^5;e=89;a=1;if(a%2==0,a=a+1);b=ceil(log(n)/log(2));i=0;d=floor(b^(2.5));v=vector(d);for(n=0,b,for(p=a,b,if(n==0,x=p,x=b);forstep(m=a,x,2,c=2^(n+m+p+1)-2^(m+p+1)+2^(p+1)+m-2;if(isprime(c),i++;v[i]=c))));w=vecsort(v,,8);u=vector(#(w)-1);for(j=1,#(w)-1,u[j]=w[j+1]);if(e>#(u),e=#(u));s=vector(e);for(k=1,e,s[k]=u[k];print1(s[k], ", "))

A273942 Primes of the form 3^k + k.

Original entry on oeis.org

11, 6569, 16677181699666603
Offset: 1

Views

Author

Vincenzo Librandi, Jun 06 2016

Keywords

Comments

Terms given correspond to k in A057900.
a(4) has 731 digits.

Crossrefs

Programs

  • Magma
    [a: n in [0..100] | IsPrime(a) where a is 3^n+n];
  • Mathematica
    Select[Table[3^n + n, {n, 1, 1000}], PrimeQ]

Formula

a(n) = A104743(A057900(n)). - Amiram Eldar, Jul 27 2025

A359735 Let f(s,n) = 2^n + s*n, with s in {-1, 1}. Let c be the number of primes out of the pair f(-1,n), f(1,n). If only f(-1,n) is prime, a(n) = -1, otherwise a(n) = c.

Original entry on oeis.org

0, 1, -1, 2, 0, 1, 0, 0, 0, 2, 0, 0, 0, -1, 0, 1, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Jean-Marc Rebert, Jan 12 2023

Keywords

Examples

			f(-1,1) = 2^1 - 1 = 1, is not prime and f(1,1) = 2^1 + 1 = 3 is prime, so a(1) = 1.
f(-1,2) = 2^2 - 2 = 2, is prime and f(1,2) = 2^2 + 2 = 6 = 2 * 3 is not prime, so a(2) = -1.
f(-1,3) = 2^3 - 3 = 5, is prime and f(1,3) = 2^3 + 3 = 11 is prime, so a(3) = 2.
		

Crossrefs

Programs

  • PARI
    f(s,n)=2^n+s*n
    a(n)=my(a=isprime(f(-1,n)),b=isprime(f(1,n)),c=a+b); if(c==1&&a==1,return(-1),return(c))

Formula

a(n) can be = 2 only if n = 6*m + 3 for m >= 0 and m is not congruent to {0, 4} mod 5, not congruent to {2, 4} mod 7, not congruent to {6, 7} mod 11 and not congruent to {3, 9} mod 13. Does a(n) = 2 for n > 9 exist? - Thomas Scheuerle, Jan 12 2023
Showing 1-6 of 6 results.