OFFSET
1,1
LINKS
Jinyuan Wang, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1)= 3 because 3 > 3*1 - 1;
a(2)= 7 because 7 > 3*2 - 1;
a(3)=13 because 13 > 3*4 - 1;
a(4)=19 because 19 > 3*6 - 1;
a(5)=31 because 31 > 3*8 - 1;
a(6)=31 because 31 > 3*10 - 1.
MAPLE
A003627 := proc(n) option remember; if n <= 2 then op(n, [2, 5]); else for a from procname(n-1)+2 by 2 do if isprime(a) and a mod 3 = 2 then return a; end if; end do: end if; end proc:
seq(nextprime(A003627(n)), n=1..120) ; # R. J. Mathar, May 22 2010
MATHEMATICA
NextPrime[#]&/@Select[Table[3n-1, {n, 250}], PrimeQ] (* Harvey P. Dale, Jan 21 2011 *)
PROG
(PARI) is(k) = k%3 == 2 && isprime(k);
lista(nn) = {k=1; for(n=1, nn, while(is(k)==0, k++); print1(nextprime(k++), ", "))} \\ Jinyuan Wang, Feb 18 2019
CROSSREFS
KEYWORD
nonn,less
AUTHOR
Juri-Stepan Gerasimov, Dec 17 2009
EXTENSIONS
Roughly 70 percent of the terms changed, starting at a(5), by R. J. Mathar, May 22 2010
STATUS
approved