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.

A185934 Lesser of two consecutive primes which both equal 1 (mod 3).

This page as a plain text file.
%I A185934 #22 Apr 12 2025 03:48:18
%S A185934 31,61,73,151,157,199,211,271,331,367,373,433,523,541,571,601,607,619,
%T A185934 661,727,733,751,991,997,1033,1063,1069,1117,1123,1201,1231,1237,1291,
%U A185934 1321,1381,1453,1459,1531,1543,1621,1657,1669,1741,1747,1753,1759,1777,1789,1861,1987,2011,2131,2161,2179,2281,2287,2341,2371
%N A185934 Lesser of two consecutive primes which both equal 1 (mod 3).
%C A185934 Or, primes of the form 6k+1 such that the next prime is again of the form 6k'+1.
%H A185934 Reinhard Zumkeller, <a href="/A185934/b185934.txt">Table of n, a(n) for n = 1..1000</a>
%F A185934 a(n) = A217659(n) - 6*A219244(n); A217659(n) = A151800(a(n)). - _Reinhard Zumkeller_, Nov 16 2012
%e A185934 The smallest prime of the form 6k+1 such that the next larger prime differs by a multiple of 3 (and thus a multiple of 6), is a(1) = 31, the following prime being 31+6 = 37.
%e A185934 Note that the next larger prime may also differ by 12 (as is the case for 199,211,619,661,997,1201,1237,1459,1531,1789,3049,...), or by 18 (as it is the case for 523,1069,1381,1759,2161,2503,3889,...), etc.
%t A185934 With[{p = Prime[Range[350]]}, ind = Position[Mod[p, 3], 1] // Flatten; p[[ind[[Position[Differences[ind], 1] // Flatten]]]]] (* _Amiram Eldar_, Apr 12 2025 *)
%o A185934 (PARI) forprime( p=1,1e4, (o+0-o=p)%3==0 & o%3==1 & print1( precprime(p-1)","))
%o A185934 (Haskell)
%o A185934 a185934 n = a185934_list !! (n-1)
%o A185934 a185934_list = map (a000040 . (+ 1)) $
%o A185934    elemIndices 1 $ zipWith (*) a039701_list $ tail a039701_list
%o A185934 -- _Reinhard Zumkeller_, Nov 16 2012
%Y A185934 Cf. A002476, A151800, A217659, A219244.
%K A185934 nonn
%O A185934 1,1
%A A185934 _M. F. Hasler_, Feb 06 2011