OFFSET
2,1
LINKS
Robert Israel, Table of n, a(n) for n = 2..2214
FORMULA
a(n) = 0 for n = 2 mod 4, n > 2.
MAPLE
f:= proc(n) local k, p;
if n mod 4 = 2 and n > 2 then return 0 fi;
for k from 1 to n-1 do
p:= 2^(n-k)*3^k-1;
if isprime(p) then return p fi
od;
0
end proc:
map(f, [$2..40]); # Robert Israel, Sep 01 2020
PROG
(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), ", "))
CROSSREFS
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Aug 28 2020
STATUS
approved