OFFSET
0,1
COMMENTS
LINKS
EXAMPLE
MATHEMATICA
np1[n_]:=Module[{x=Ceiling[n/2]}, If[PrimeQ[x], x, NextPrime[x]]]; np2[n_]:= Module[{x=2n}, If[PrimeQ[x], x, NextPrime[x]]]; Table[If[Mod[n, 3]==2, np1[n], np2[n]], {n, 0, 70}] (* Harvey P. Dale, Jul 10 2013 *)
PROG
(PARI) A138757(n)=nextprime(if(n%3==2, (n+1)\2, 2*n))
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
M. F. Hasler, Apr 04 2008
STATUS
approved