OFFSET
1,2
COMMENTS
From Robert Israel, Jan 03 2017: (Start)
a(n+1) <= 3*a(n), with equality if and only if a(n+1) is divisible by 3.
For n > 1, a(n) <= floor(3^n/p) where p is the greatest prime <= 3^(n/2)-1.
a(n) = 2 if and only if n is in A028491. (End)
LINKS
Robert Israel, Table of n, a(n) for n = 1..2000
MAPLE
f:= proc(n) local t, k;
t:= 3^n;
for k from 2 to t/3 do if isprime(floor(t/k)) then return k fi od:
end proc:
f(1):= 1:
map(f, [$1..100]); # Robert Israel, Jan 03 2017
PROG
(PARI) a(n)=if(n<0, 0, k=1; while(isprime(floor(3^n/k))==0, k++); k)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Benoit Cloitre, Sep 04 2002
STATUS
approved