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

A159266 Least positive integer m such that 2^n+3^m is prime.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 2, 2, 4, 1, 3, 3, 1, 1, 8, 1, 4, 8, 8, 6, 2, 7, 27, 6, 13, 1, 10, 1, 6, 4, 8, 18, 9, 19, 2, 15, 29, 3, 3, 17, 10, 3, 11, 6, 2, 5, 20, 34, 4, 12, 10, 26, 1, 4, 2, 9, 29, 29, 10, 34, 13, 4, 8, 2, 1, 8, 10, 26, 50, 19, 12, 10, 8, 13, 27, 17, 9, 33, 4, 2, 17, 1, 7, 3, 5, 61, 26
Offset: 1

Views

Author

M. F. Hasler, Apr 07 2009

Keywords

Comments

In contrast to A123340 which allows m=0, a(0) does not exist for this sequence.

Examples

			a(1)=1 is the least m>0 such that 2^1+3^m (=5) is prime.
a(2)=1 is the least m>0 such that 2^2+3^m (=7) is prime.
a(5)=2 is the least m>0 such that 2^5+3^m (=41) is prime.
		

Crossrefs

Cf. A123340 (allows for m=0), A123359 (roles of 2 and 3 exchanged).

Programs

  • Maple
    f:= proc(n) local t,m;
      t:= 2^n;
      for m from 1 do if isprime(t+3^m) then return m fi od
    end proc:
    map(f, [$1..100]); # Robert Israel, Sep 18 2018
  • Mathematica
    a[n_] := Module[{m, t = 2^n}, For[m = 1, True, m++, If[PrimeQ[t + 3^m], Return[m]]]];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Feb 01 2023 *)
  • PARI
    A159266(n,m=0)=until( is/*pseudo*/prime(2^n+3^m++),);m /* 2nd optional arg allows us to resume search after a given m and thus (when set to previous result) the list of all m yielding primes */

Formula

a(n) = min { m>0 | 2^n+3^m is prime } = A123340(n) whenever the latter is > 1.

A159625 Numbers n such that 2^x + 3^y is never prime when max(x,y) = n.

Original entry on oeis.org

1679, 1743, 4980, 4982, 5314, 5513, 5695, 6100, 6578, 7251, 7406, 7642, 8218, 8331, 9475, 9578, 9749, 10735
Offset: 1

Views

Author

David Broadhurst, Apr 17 2009

Keywords

Comments

Mark Underwood found that for each nonnegative integer n < 1421 there is at least one prime of the form 2^m + 3^n or 2^n + 3^m with m not exceeding n.
This sequence consists of numbers for which there is no such prime.
David Broadhurst estimated that a fraction in excess of 1/800 of the natural numbers belongs to this sequence and found 17 instances with n < 10^4.
For each of the remaining 9983 nonnegative integers n < 10^4, a prime or probable prime of the form 2^x + 3^y was found with max(x,y) = n.
Each probable prime was subjected to a combination of strong Fermat and strong Lucas tests.

Examples

			a(3) = 4980, since there is no prime of the form 2^m + 3^4980 or 2^4980 + 3^m with m < 4981 and 4980 is the third number n such that 2^x + 3^y is never prime when max(x,y) = n.
		

Crossrefs

Extensions

a(18) from Giovanni Resta, Apr 09 2014

A159270 Number of positive integers m<=n such that 2^m+3^n or 2^n+3^m is prime.

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 3, 4, 5, 3, 5, 3, 6, 6, 4, 4, 7, 6, 8, 4, 4, 4, 4, 6, 7, 2, 4, 5, 6, 6, 8, 6, 10, 3, 3, 5, 6, 4, 9, 6, 9, 7, 5, 5, 9, 6, 8, 7, 7, 10, 4, 5, 8, 9, 1, 8, 6, 6, 7, 7, 10, 5, 5, 4, 10, 8, 7, 8, 8, 2, 3, 8, 8, 8, 5, 6, 7, 5, 10, 6, 7, 7, 8, 10, 10, 9, 10, 5, 7, 5, 5, 6, 9, 6, 5, 5, 12, 3, 7, 6, 8, 9
Offset: 0

Views

Author

M. F. Hasler, Apr 09 2009

Keywords

Comments

Zeros occur at n = 0 and for n in A159625.
For the values in A159625 both A159266(x) and A123359(x) are greater than x. - Michel Marcus, Apr 07 2014

Crossrefs

Programs

  • PARI
    A159270(n)=sum(m=1,n, ispseudoprime(2^n+3^m) || ispseudoprime(3^n+2^m))

A159269 Least positive integer such that 2^m+3^n or 2^n+3^m is prime.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 4, 1, 3, 1, 1, 1, 6, 1, 4, 3, 8, 2, 2, 1, 7, 1, 4, 1, 10, 1, 4, 4, 8, 15, 6, 1, 2, 3, 8, 3, 3, 2, 6, 3, 11, 6, 2, 5, 4, 18, 4, 12, 6, 26, 1, 4, 2, 9, 6, 4, 10, 18, 1, 4, 6, 2, 1, 8, 10, 26, 12, 17, 12, 10, 4, 13, 3, 7, 9, 11, 4, 2, 17, 1, 7, 3, 2, 3, 26, 22, 6, 12, 8, 9
Offset: 0

Views

Author

M. F. Hasler, Apr 08 2009

Keywords

Comments

It seems that a(n)<=n for all n>0.

Examples

			a(0)=1 since 2^1+3^0=3 is prime.
a(1)=1 since 2^1+3^1=5 is prime.
a(2)=1 since 2^2+3^1=7, or 2^1+3^2=11, is prime. (Only one prime is required).
a(3)=1 since 2^3+3^1=11 and also 2^1+3^3=29, are prime.
a(4)=1 since 2^4+3^1=19 (and also 2^1+3^4=83) are prime.
a(5)=2 is the least integer m such that 2^5+3^m (=41) is prime and 2^m+3^5 is not prime until A159267(5)=4.
		

Programs

  • PARI
    A159269(n,m=0)=until( is/*pseudo*/prime(2^n+3^m++) || is/*pseudo*/prime(3^n+2^m),);m

Formula

a(n) = min { A123359(n), A159266(n) }
Showing 1-4 of 4 results.