login
A171747
Smallest prime > n-th prime of the form 3*k-1.
1
3, 7, 13, 19, 29, 31, 43, 53, 59, 61, 73, 89, 97, 103, 109, 127, 137, 139, 151, 173, 179, 181, 193, 199, 229, 239, 241, 257, 263, 269, 271, 283, 307, 313, 331, 349, 359, 367, 389, 397, 409, 421, 433, 449, 457, 463, 479, 487, 499, 509, 521, 523, 563, 569, 571
OFFSET
1,1
LINKS
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
Sequence in context: A193765 A000960 A147614 * A031215 A099957 A086148
KEYWORD
nonn,less
AUTHOR
EXTENSIONS
Roughly 70 percent of the terms changed, starting at a(5), by R. J. Mathar, May 22 2010
STATUS
approved