|
|
A074718
|
|
Least k such that floor(3^n/k) is prime.
|
|
1
|
|
|
1, 3, 2, 6, 14, 23, 2, 6, 11, 14, 14, 32, 2, 6, 5, 15, 14, 42, 5, 7, 21, 63, 25, 61, 19, 53, 97, 38, 19, 55, 32, 23, 69, 110, 38, 114, 115, 31, 5, 15, 45, 29, 77, 7, 21, 63, 189, 37, 111, 226, 14, 42, 113, 44, 5, 15, 45, 135, 14, 38, 114, 137, 32, 37, 49, 147, 5, 15, 45, 79, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
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
|
|
|
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:
|
|
PROG
|
(PARI) a(n)=if(n<0, 0, k=1; while(isprime(floor(3^n/k))==0, k++); k)
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|