login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Largest m<=n such that 2^m+3^n is prime, 0 if no such m exists.
1

%I #3 Jul 14 2012 11:32:24

%S 0,1,2,2,4,3,5,6,7,4,9,6,7,7,10,14,11,8,14,0,9,20,19,18,23,12,19,25,

%T 25,11,26,28,25,10,15,6,35,30,27,34,31,24,19,37,36,34,38,32,23,48,41,

%U 50,44,47,0,28,41,52,54,48,52,52,39,53,56,63,17,57,63,14,62,60,55,54,59,17,56

%N Largest m<=n such that 2^m+3^n is prime, 0 if no such m exists.

%C For n>0, a(n)=0 means that there is no such m, since 2^0+3^n cannot be prime for n>0.

%e a(0)=0 since 2^0+3^0=2 is prime.

%e a(18)=14 is the largest integer m <= 18 such that 2^m+3^18 is prime.

%e a(19)=0 since there is no integer m <= 19 such that 2^m+3^19 is prime.

%o (PARI) A159268(n)=forstep(m=n,1,-1,is/*pseudo*/prime(2^m+3^n) & return(m))

%K nonn

%O 0,3

%A _M. F. Hasler_, Apr 07 2009