cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A057621 Initial prime in first sequence of n primes congruent to 2 modulo 3.

This page as a plain text file.
%I A057621 #23 Aug 05 2025 05:09:34
%S A057621 2,23,47,251,1889,7793,43451,243161,726893,759821,1820111,1820111,
%T A057621 10141499,19725473,19725473,136209239,400414121,400414121,489144599,
%U A057621 489144599,766319189,766319189,21549657539,21549657539,21549657539,140432294381,140432294381
%N A057621 Initial prime in first sequence of n primes congruent to 2 modulo 3.
%C A057621 Same as A057622 except for a(1). - _Jens Kruse Andersen_, May 30 2006
%H A057621 Giovanni Resta, <a href="/A057621/b057621.txt">Table of n, a(n) for n = 1..35</a> (terms < 4*10^14)
%H A057621 J. K. Andersen, <a href="http://primerecords.dk/congruent-primes.htm">Consecutive Congruent Primes</a>.
%F A057621 a(n) = A000040(A247967(n)) for all n > 1. - _M. F. Hasler_, Sep 03 2016
%e A057621 a(12) = 1820111 because this number is the first in a sequence of 12 consecutive primes all of the form 3*n + 2.
%t A057621 NextPrime[ n_Integer ] := Module[ {k = n + 1}, While[ ! PrimeQ[ k ], k++ ]; Return[ k ] ]; PrevPrime[ n_Integer ] := Module[ {k = n - 1}, While[ ! PrimeQ[ k ], k-- ]; Return[ k ] ]; p = 0; Do[ a = Table[ -1, {n} ]; k = Max[ 1, p ]; While[ Union[ a ] != {2}, k = NextPrime[ k ]; a = Take[ AppendTo[ a, Mod[ k, 3 ] ], -n ] ]; p = NestList[ PrevPrime, k, n ]; Print[ p[ [ -2 ] ] ]; p = p[ [ -1 ] ], {n, 1, 18} ]
%Y A057621 Cf. A057622, A000040, A247967.
%K A057621 nonn
%O A057621 1,1
%A A057621 _Robert G. Wilson v_, Oct 09 2000
%E A057621 More terms from _Jens Kruse Andersen_, May 30 2006