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.

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