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.
%I A185004 #44 Jun 06 2017 23:28:32 %S A185004 7,31,43,67,97,103,151,163,181,223,229,271,331,337,367,373,409,433, %T A185004 487,499,571,577,601,607,631,643,709,727,751,769,823,853,883,937,991, %U A185004 1009,1021,1033,1051,1063,1087,1117,1123,1231,1291,1297,1303 %N A185004 Ramanujan modulo primes R_(3,1)(n): a(n) is the smallest number such that if x >= a(n), then pi_(3,1)(x) - pi_(3,1)(x/2) >= n, where pi_(3,1)(x) is the number of primes==1 (mod 3) <= x. %C A185004 All terms are primes==1 (mod 3). %C A185004 A modular generalization of Ramanujan numbers, see Section 6 of the Shevelev-Greathouse-Moses paper. %C A185004 We conjecture that for all n >= 1 a(n) <= A104272(3*n). This conjecture is based on observation that, if interval (x/2, x] contains >= 3*n primes, then at least n of them are of the form 3*k+1. %C A185004 The function pi_(3,1)(n) starts 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3,... with records occurring as specified in A123365/A002476. - _R. J. Mathar_, Jan 10 2013 %H A185004 G. C. Greubel, <a href="/A185004/b185004.txt">Table of n, a(n) for n = 1..1000</a> %H A185004 Vladimir Shevelev, Charles R. Greathouse IV, Peter J. C. Moses, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL16/Moses/moses1.html">On intervals (kn, (k+1)n) containing a prime for all n>1</a>, Journal of Integer Sequences, Vol. 16 (2013), Article 13.7.3. <a href="http://arxiv.org/abs/1212.2785">arXiv:1212.2785</a> %F A185004 lim(a(n)/prime(4*n)) = 1 as n tends to infinity. %p A185004 pimod := proc(m,n,x) %p A185004 option remember; %p A185004 a := 0 ; %p A185004 for k from n to x by m do %p A185004 if isprime(k) then %p A185004 a := a+1 ; %p A185004 end if; %p A185004 end do: %p A185004 a ; %p A185004 end proc: %p A185004 a := [seq(0,n=1..100)] ; %p A185004 for x from 1 do %p A185004 pdiff := pimod(3,1,x)-pimod(3,1,x/2) ; %p A185004 if pdiff+1 <= nops(a) then %p A185004 v := x+1 ; %p A185004 n := pdiff+1 ; %p A185004 if n<v then %p A185004 a := subsop(n=v,a) ; %p A185004 print(a) ; %p A185004 end if; %p A185004 end if; %p A185004 end do: # _R. J. Mathar_, Jan 10 2013 %t A185004 max = 100; pimod[m_, n_, x_] := pimod[m, n, x] = Module[{a = 0}, For[k = n, k <= x, k = k + m, If[PrimeQ[k], a = a + 1]]; a]; a[_] = 0; For[x = 1, x <= max^2, x++, pdiff = pimod[3, 1, x] - pimod[3, 1, x/2]; If[ pdiff + 1 <= max, v = x + 1; n = pdiff + 1; If[ n < v , a[n] = v ] ] ]; Table[a[n], {n, 1, max}] (* _Jean-François Alcover_, Jan 28 2013, translated and adapted from _R. J. Mathar_'s Maple program *) %Y A185004 Cf. A104272, A185005, A185006, A185007. %K A185004 nonn %O A185004 1,1 %A A185004 _Vladimir Shevelev_ and _Peter J. C. Moses_, Dec 18 2012