OFFSET
1,1
COMMENTS
See A055626 for the variant "exactly n". See A247967 for the indices of these primes. See A057620, A057621 for variants "congruent to 5 (mod 6)", resp. "(mod 3)". - M. F. Hasler, Sep 03 2016
The sequence is infinite, by Shiu's theorem. - Jonathan Sondow, Jun 22 2017
REFERENCES
R. K. Guy, "Unsolved Problems in Number Theory", A4
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..35 (terms < 4*10^14)
J. K. Andersen, Consecutive Congruent Primes.
D. K. L. Shiu, Strings of Congruent Primes, J. Lond. Math. Soc. 61 (2) (2000) 359-373 [MR1760689]
FORMULA
a(n) <= A055625(n). - Zak Seidov, Aug 29 2016
EXAMPLE
a(6) = 1741 because this number is the first in a sequence of 6 consecutive primes all of the form 3n + 1.
MATHEMATICA
p = 0; Do[a = Table[-1, {n}]; k = Max[1, p]; While[Union[a] != {1}, k = NextPrime[k]; a = Take[AppendTo[a, Mod[k, 3]], -n]]; p = NestList[NextPrime[#, -1] &, k, n]; Print[p[[-2]]]; p = p[[-1]], {n, 1, 18}] (* Robert G. Wilson v, updated by Michael De Vlieger, Sep 03 2016 *)
Table[k = 1; While[Total@ Boole@ Map[Mod[#, 6] == 1 &, NestList[NextPrime, Prime@ k, n - 1]] != n, k++]; Prime@ k, {n, 12}] (* Michael De Vlieger, Sep 03 2016 *)
PROG
(PARI) m=c=o=0; forprime(p=1, , p%6 != 1 && (!c||!c=0) && next; c||o=p; c++>m||next; m++; print1(", ", o)) \\ M. F. Hasler, Sep 03 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Oct 09 2000
EXTENSIONS
More terms from Don Reble, Nov 16 2003
More terms from Jens Kruse Andersen, May 30 2006
Definition clarified by Zak Seidov, Jun 19 2017
STATUS
approved