OFFSET
1,3
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
f:= proc(n) local F, m, Q, E, p;
F:= ifactors(n)[2];
m:= nops(F);
Q:= map(t -> t[1], F);
E:= map(t -> t[2], F);
p:= max(Q)-1;
do
p:= nextprime(p);
if andmap(i -> add(floor(p/Q[i]^j), j=1..floor(log[Q[i]](p))) >= E[i], [$1..m]) then return p fi;
od
end proc:
f(1):= 2:
map(numtheory:-pi @ f, [$1..100]); # Robert Israel, Mar 07 2018
MATHEMATICA
a = {}; Do[m = 1; While[ ! IntegerQ[Prime[m]!/n], m++ ]; AppendTo[a, m], {n, 1, 100}]; a
PROG
(PARI) a(n) = forprime(p=2, , if (!(p! % n), return (primepi(p)))); \\ Michel Marcus, Mar 08 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Artur Jasinski, Apr 11 2008
STATUS
approved