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.

A337437 a(n) is the least prime of the form 2^j*3^k - 1, j > 0, k > 0, j + k = n. a(n) = 0 if no such prime exists.

This page as a plain text file.
%I A337437 #7 Sep 01 2020 16:29:11
%S A337437 5,11,23,47,0,191,383,1151,0,6911,6143,27647,0,73727,497663,294911,0,
%T A337437 786431,17915903,10616831,0,18874367,188286357653,169869311,0,
%U A337437 39182082047,10319560703,4076863487,0,7247757311,32614907903,495338913791,0,51539607551,1174136684543
%N A337437 a(n) is the least prime of the form 2^j*3^k - 1, j > 0, k > 0, j + k = n. a(n) = 0 if no such prime exists.
%H A337437 Robert Israel, <a href="/A337437/b337437.txt">Table of n, a(n) for n = 2..2214</a>
%F A337437 a(n) = 0 for n = 2 mod 4, n > 2.
%p A337437 f:= proc(n) local k, p;
%p A337437    if n mod 4 = 2 and n > 2 then return 0 fi;
%p A337437    for k from 1 to n-1 do
%p A337437      p:= 2^(n-k)*3^k-1;
%p A337437      if isprime(p) then return p fi
%p A337437    od;
%p A337437    0
%p A337437 end proc:
%p A337437 map(f, [$2..40]); # _Robert Israel_, Sep 01 2020
%o A337437 (PARI) for(n=2,36, my(pm=oo); for(j=1,n-1, my(k=n-j,p=2^j*3^k-1);if(isprime(p),pm=min(p,pm))); print1(if(pm==oo,0,pm),", "))
%Y A337437 Cf. A336773.
%K A337437 nonn
%O A337437 2,1
%A A337437 _Hugo Pfoertner_, Aug 28 2020