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.

Previous Showing 31-40 of 43 results. Next

A153503 Primes p such that 2^(p-1)+3 is prime.

Original entry on oeis.org

2, 3, 5, 7, 13, 17, 19, 29, 31, 229, 2371, 4003, 33029, 55457, 58313, 205963, 1875553
Offset: 1

Views

Author

Vincenzo Librandi, Dec 28 2008

Keywords

Comments

A prime p is in the sequence if and only if p-1 is in A057732.

Examples

			For p = 2, 2^(p-1)+3 = 5 is prime.
For p = 17, 2^(p-1)+3 = 65539 is prime.
For p = 31, 2^(p-1)+3 = 1073741827 is prime.
		

Crossrefs

Cf. A057732 (numbers k such that 2^k + 3 is prime), A057736 (primes p such that 2^p + 3 is prime), A000043 (primes p such that 2^p - 1 is prime).

Programs

  • Magma
    [p: p in PrimesUpTo(2000) | IsPrime(2^(p-1) + 3)]; // Vincenzo Librandi, Jun 09 2015
  • Mathematica
    Select[Prime[Range[3000]], PrimeQ[2^(# - 1) + 3] &] (* Vincenzo Librandi, Jun 09 2015 *)

Extensions

Edited and a(13)-a(15) (based on A057732) added by Klaus Brockhaus, Jan 06 2009
a(16) from Vincenzo Librandi, Jun 09 2015
a(17) from Amiram Eldar, Aug 01 2024

A165991 Numbers n such that 3 + 2^n is not prime.

Original entry on oeis.org

0, 5, 8, 9, 10, 11, 13, 14, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87
Offset: 1

Views

Author

Vincenzo Librandi, Oct 03 2009

Keywords

Comments

Complement of A057732.

Examples

			For n=0, 3+2^0=4 is not prime. n=5, 3+2^5=35=5*7, not prime. n=8, 3+2^8=259=7*37 not prime.
		

Programs

  • Magma
    [n: n in [0..100] |not IsPrime(3 + 2^n )]; // Vincenzo Librandi, Oct 15 2012
  • Mathematica
    Select[Range[0, 100], !PrimeQ[3 + 2^#] &] (* Vincenzo Librandi, Oct 15 2012 *)

Extensions

Entries checked - R. J. Mathar, Oct 05 2009

A229065 Numbers of the form 2^(p-1)+3, where p is prime.

Original entry on oeis.org

5, 7, 19, 67, 1027, 4099, 65539, 262147, 4194307, 268435459, 1073741827, 68719476739, 1099511627779, 4398046511107, 70368744177667, 4503599627370499, 288230376151711747, 1152921504606846979, 73786976294838206467, 1180591620717411303427, 4722366482869645213699
Offset: 1

Views

Author

Vincenzo Librandi, Sep 17 2013

Keywords

Comments

Primes in the sequence: 5, 7, 19, 67, 4099, 65539, 262147, 268435459, 1073741827, ...
On the other hand, for example, 2^(p-1) + 3 is composite when p == 11 (mod 12) or p == 5 (mod 18), with p>5; or when p is of the form 2*h^2+2*h*(k+2)+3*k, with k>0 and h>1.

Crossrefs

Cf. A153503 (associated primes p), A098828, A057732, A057736.

Programs

  • Magma
    [2^(p-1)+3:  p in PrimesUpTo(80)];
  • Mathematica
    Table[2^(Prime[n] - 1) + 3, {n, 25}]

A245476 Least number k > 1 such that k^n + k + 1 is prime, or 0 if no such number exists.

Original entry on oeis.org

2, 2, 2, 2, 0, 2, 2, 0, 3, 3, 0, 2, 5, 0, 2, 2, 0, 2, 8, 0, 6, 3, 0, 6, 15, 0, 6, 2, 0, 2, 23, 0, 23, 56, 0, 15, 114, 0, 14, 11, 0, 3, 14, 0, 29, 110, 0, 21, 9, 0, 53, 59, 0, 6, 2, 0, 3, 29, 0, 71, 21, 0, 146, 17, 0, 35, 2, 0, 9, 6, 0, 77, 41, 0, 27, 176, 0, 153, 21, 0, 39, 32, 0, 2, 314, 0, 3, 5, 0, 66, 44, 0, 234
Offset: 1

Views

Author

Derek Orr, Jul 23 2014

Keywords

Comments

Except for a(2), a(n) = 0 if n == 2 mod 3 (A016789).
It appears that this is an "if and only if".
a(n) = 2 if and only if n is in A057732.
Many terms in the linked table correspond to probable primes. If n == 2 mod 3 then k^2+k+1 divides k^n+k+1. This is why a(n) = 0 if n > 2 and n == 2 mod 3. - Jens Kruse Andersen, Jul 28 2014

Examples

			2^9 + 2 + 1 = 515 is not prime. 3^9 + 3 + 1 = 19687 is prime. Thus a(9) = 3.
		

Crossrefs

Cf. Numbers n such that n^s + n + 1 is prime: A005097 (s = 1), A002384 (s = 2), A049407 (s = 3), A049408 (s = 4), A075723 (s = 6), A075722 (s = 7), A075720 (s = 9), A075719 (s = 10), A075718 (s = 12), A075717 (s = 13), A075716 (s = 15), A075715 (s = 16), A075714 (s = 18), A075713 (s = 19).

Programs

  • Maple
    f:= proc(n) local k;
       if n mod 3 = 2 and n > 2 then return 0 fi;
       for k from 2 to 10^6 do
          if isprime(k^n+k+1) then return k fi
       od:
      error("no solution found for n = %1",n);
    end proc:
    seq(f(n),n=1..100); # Robert Israel, Jul 27 2014
  • PARI
    a(n) = if(n>2&&n==Mod(2, 3), return(0)); k=2; while(!ispseudoprime(k^n+k+1), k++); k
    vector(150, n, a(n)) \\ Derek Orr with corrections and improvements from Colin Barker, Jul 23 2014

A305531 Smallest k >= 1 such that (n-1)*n^k + 1 is prime.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 2, 1, 3, 10, 3, 1, 2, 1, 1, 4, 1, 29, 14, 1, 1, 14, 2, 1, 2, 4, 1, 2, 4, 5, 12, 2, 1, 2, 2, 9, 16, 1, 2, 80, 1, 2, 4, 2, 3, 16, 2, 2, 2, 1, 15, 960, 15, 1, 4, 3, 1, 14, 1, 6, 20, 1, 3, 946, 6, 1, 18, 10, 1, 4, 1, 5, 42, 4, 1, 828, 1, 1, 2, 1, 12, 2, 6, 4, 30, 3, 3022, 2, 1, 1
Offset: 2

Views

Author

Eric Chen, Jun 04 2018

Keywords

Comments

a(prime(j)) + 1 = A087139(j).
a(123) > 10^5, a(342) > 10^5, see the Barnes link for the Sierpinski base-123 and base-342 problems.
a(251) > 73000, see A087139.

Crossrefs

For the numbers k such that these forms are prime:
a1(b): numbers k such that (b-1)*b^k-1 is prime
a2(b): numbers k such that (b-1)*b^k+1 is prime
a3(b): numbers k such that (b+1)*b^k-1 is prime
a4(b): numbers k such that (b+1)*b^k+1 is prime (no such k exists when b == 1 (mod 3))
a5(b): numbers k such that b^k-(b-1) is prime
a6(b): numbers k such that b^k+(b-1) is prime
a7(b): numbers k such that b^k-(b+1) is prime
a8(b): numbers k such that b^k+(b+1) is prime (no such k exists when b == 1 (mod 3)).
Using "-------" if there is currently no OEIS sequence and "xxxxxxx" if no such k exists (this occurs only for a4(b) and a8(b) for b == 1 (mod 3)):
.
b a1(b) a2(b) a3(b) a4(b) a5(b) a6(b) a7(b) a8(b)
--------------------------------------------------------------------
4 A272057 ------- ------- xxxxxxx A059266 A089437 A217348 xxxxxxx
7 A046866 A245241 ------- xxxxxxx A191469 A217130 A217131 xxxxxxx
11 A046867 A057462 ------- ------- ------- ------- ------- -------
12 A079907 A251259 ------- ------- ------- A137654 ------- -------
13 A297348 ------- ------- xxxxxxx ------- ------- ------- xxxxxxx
14 A273523 ------- ------- ------- ------- ------- ------- -------
15 ------- ------- ------- ------- ------- ------- ------- -------
16 ------- ------- ------- xxxxxxx ------- ------- ------- xxxxxxx
Cf. (smallest k such that these forms are prime) A122396 (a1(b)+1 for prime b), A087139 (a2(b)+1 for prime b), A113516 (a5(b)), A076845 (a6(b)), A178250 (a7(b)).

Programs

  • PARI
    a(n)=for(k=1,2^16,if(ispseudoprime((n-1)*n^k+1),return(k)))

A329102 Numbers k such that both k^2 + 3 and 2^k + 3 are primes.

Original entry on oeis.org

2, 4, 28, 784
Offset: 1

Views

Author

Alex Ratushnyak, Nov 04 2019

Keywords

Comments

Intersection of A057732 and A049422.
a(5) > 20000. - Tyler NeSmith, May 15 2021
a(5) > 2205444, using A057732. - Michael S. Branicky, Feb 16 2024

Crossrefs

A331487 Primes p such that exactly one of 2^(p+1) - 3 and 2^(p+1) + 3 is a prime.

Original entry on oeis.org

13, 17, 19, 23, 29, 83, 149, 173, 227, 389, 1109, 4001, 35753, 36551, 363119, 702193
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 18 2020

Keywords

Comments

Primes p such that exactly one of k*2^p - 2*k + 1 and k*2^p + 2*k - 1 is a prime:
k = 1: odd terms in A000043;
k = 2: this sequence;
k = 3: 5, 13, 19, 29, 31, 109, 139, 271, 379, 1553, ...
k = 4: 2, 37, ...
k = 5: 3, 5, 7, 17, 19, 23, 41, 61, 67, 151, 157, 313, 4111, 6337, ...
k = 6: 2, 5, 7, 11, 19, 29, 149, 191, 373, 449, 983, 1667, 1973, ...
k = 7: 2, 3, 5, 7, 11, 13, 29, 43, 61, 97, 109, 127, 131, 239, 461, 1153, ...
k = 8: 3, 11, 19, 23, 29, 37, 43, 97, 193, 307, 617, 1847, ...
k = 9: 3, 5, 23, 41, 61, 71, 97, 131, 157, 863, 3119, ...
k = 10: 2, 3, 13, ...
...

Examples

			13 is in this sequence because 2^(13+1) - 3 = 16381 (prime) and 2^(13+1) + 3 = 16387 (composite number).
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(1000) | not (#[k: k in [2] | IsPrime(k*2^p-2*k+1)]) eq (#[k: k in [2] | IsPrime(k*2^p+2*k-1)])];
    
  • Mathematica
    Select[Range[400], PrimeQ[#] && Xor @@ PrimeQ[2^(# + 1) + {-3, 3}] &] (* Amiram Eldar, Jan 19 2020 *)
  • PARI
    isok(p) = isprime(2*2^p-3) + isprime(2*2^p+3) == 1;
    forprime(p=2, 500, if(isok(p), print1(p, ", "))); \\ Jinyuan Wang, Jan 19 2020

Extensions

a(12)-a(16) added using A050414 and A057732 by Jinyuan Wang, May 15 2020

A071781 Primes p with p-2^e and p+2^e prime for some exponent e.

Original entry on oeis.org

5, 7, 11, 67, 32771
Offset: 1

Views

Author

Rick L. Shepherd, Jun 05 2002

Keywords

Comments

For each n, p-2^e,p,p+2^e is thus an arithmetic progression of primes with difference 2^e. Note that for each n=1,2,3,4,5, only one such e exists and p-2^e=3. There are no other terms up to 20000000.
For all terms, p-2^e must, in fact, be 3 (as one of p-2^e, p and p+2^e is divisible by 3). Each corresponding arithmetic progression of primes has length 3 (p+2^(e+1) is also divisible by 3). Any additional term is too large to include here. Equivalently, this sequence is primes of the form 3+2^e such that 3+2^(e+1) is also prime; i.e., 3+2^A057732(k) is a term iff A057732(k+1) = A057732(k) + 1. Thus much more efficient than the PARI program below is to extend A057732 and examine its terms. - Rick L. Shepherd, Jun 20 2008

Examples

			67 is a term because 67 is prime and there exists e=6 such that both 67-2^6=67-64=3 and 67+2^6=67+64=131 are primes. 32771 is a term because 32771 is prime and there exists e=15 such that both 32771-2^15=32771-32768=3 and 32771+2^15=32771+32768=65539 are primes. Thus 3,67,131 and 3,32771,65539 are two sequences of primes in arithmetic progression with differences 2^6 and 2^15, respectively.
		

Crossrefs

Programs

  • PARI
    for(p=5,20000000,if(isprime(p),e=1; while(p-2^e>1,if(isprime(p-2^e)&&isprime(p+2^e),print1(p,","); break,e++))))

A171131 Primes p such that sum of divisors of p-3 is prime.

Original entry on oeis.org

5, 7, 19, 67, 4099, 65539, 262147, 1073741827
Offset: 1

Views

Author

Keywords

Comments

No further terms up to the 10 millionth prime. - Harvey P. Dale, Apr 30 2012
If the sum of divisors of a number k is a prime (i.e., k is in A023194), then k is a prime power. If p is prime and p-3 is a prime power, then p-3 is even, so p-3 is a power of 2. Since p-3 = 2^m then sigma(2^m) = 2^(m+1)-1 is a prime. Therefore, all the terms are primes of the form 2^m+3 where m+1 is a Mersenne exponent (A000043), i.e., m is in the intersection of A057732 and {A000043(n)-1}. So, m = 1, 2, 4, 6, 12, 16, 18, 30, and no other value <= A057732(58) = 2205444. Therefore, a(9) > 2^2205444, if it exists. - Amiram Eldar, Aug 01 2024

Examples

			5 is a term since it is a prime and sigma(5-3) = 3 is a prime.
7 is a term since it is a prime and sigma(7-3) = 7 is a prime.
19 is a term since it is a prime and sigma(19-3) = 31 is a prime.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=Plus@@Divisors[n]; lst={};Do[p=Prime[n];If[PrimeQ[f[p-3]],AppendTo[lst,p]],{n,2*10!}];lst
    Select[Prime[Range[10000000]],PrimeQ[DivisorSigma[1,#-3]]&] (* Harvey P. Dale, Apr 30 2012 *)

Extensions

a(8)-a(10) from Vincenzo Librandi, Feb 04 2013
Two wrong terms removed by Amiram Eldar, Aug 01 2024

A174272 Exactly one of 2^n-3 and 2^n+3 is prime.

Original entry on oeis.org

1, 2, 5, 7, 9, 10, 14, 15, 16, 18, 20, 22, 24, 28, 29, 30, 55, 67, 84, 94, 116, 122, 150, 174, 213, 221, 228, 233, 266, 336, 390, 452, 545, 689, 694, 784, 850, 1110, 1704, 1736, 2008, 2139, 2191, 2321, 2367, 2370, 3237, 3954, 4002, 4060, 4062, 4552, 5547, 5630
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Mar 14 2010

Keywords

Comments

Numbers n which are in A050414 or in A057732 but not in both. [From R. J. Mathar, Mar 29 2010]

Examples

			a(1)=1 because 2^1-3=-1 is nonprime and 2^1+3=5 is prime.
		

Crossrefs

Extensions

Corrected by Charles R Greathouse IV, Mar 20 2010
Previous Showing 31-40 of 43 results. Next