OFFSET
1,1
COMMENTS
The first 5 terms are somewhat arbitrary. The main condition essentially makes sense on the domain where A181942(x) ~ x/((log x) log log x) is increasing, i.e., for x>9. Instead of p>3 one could also put p>n (then the sequence would start 2,3,5,5,7,23,...). Requiring p>2 would yield a(n)=3 for n<30 and then the same sequence from n=30 on. Omitting it altogether would yield a negative r.h.s. for p=2 which therefore would be solution for any n. The currently chosen initial term "5" is the least prime in the range of A181942(n).
PROG
(PARI) A181943(n)={ n<6 & return(5); nextprime(solve(X=n, n^2, X/(log(X)*log(log(X)))-n))}
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Apr 03 2012
STATUS
approved