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 A185641 #34 Jan 23 2023 10:06:57 %S A185641 360,161,139,44,655,186,178,184,83,265,296,153,17,464,405,485,271,61, %T A185641 452,54,199,190,230,78,224,131,82,355,122,372,10,2689,528,72,173,277, %U A185641 116,331,101,207,632,303,37,58,136,35,48,181,151,390,243,118,237,973 %N A185641 Least k such that A098591(k) = n or 0 if no such k exists. %C A185641 Phil Carmody observed "7 must divide at least one of the terms. That's why (apart from the excluded k=0 range) only <=7 of the 8 terms can be prime. If 7 divides 30*k+1, it also divides 30*k+1+4*7." (See sci.math link.) %C A185641 a(n)=0 for n = 127, 254 and 255. %C A185641 The maximum value for a(n) is obtained for a(247)=22621. %H A185641 Michel Marcus, <a href="/A185641/b185641.txt">Table of n, a(n) for n = 0..255</a> %H A185641 Phil Carmody, <a href="https://groups.google.com/g/sci.math/c/SsXB-AwmzIU/m/DW2tBmAJk9MJ">7 primes in intervals [k*30,(k+1)*30]</a>, thread in newsgroup sci.math, Sep 19 2004. %H A185641 Hugo Pfoertner, <a href="http://www.randomwalk.de/scimath/primes30.pdf">Patterns count table</a> %e A185641 a(0) = 360, because A098591(360) = 0 is the first occurrence of a 0 in A098591, indicating that there are no primes between 360*30 = 10800 and 10830, i.e., 10800 + {1,7,11,13,17,19,23,29} are composite. %t A185641 max = 10^5; A098591[n_] := Sum[ 2^k*Boole[ PrimeQ[ 30*n + {1, 7, 11, 13, 17, 19, 23, 29}[[k+1]] ] ], {k, 0, 7}]; a[n_] := Catch[ For[ k = 1, k <= max, k++, If[ A098591[k] == n, Throw[k], If[ k >= max, Throw[0]]]]]; Table[ Print[n, " ", an = a[n]]; an, {n, 0, 255}] (* _Jean-François Alcover_, Jan 31 2013 *) %Y A185641 Cf. A098591. %K A185641 nonn,fini,full %O A185641 0,1 %A A185641 _Michel Marcus_, Jan 31 2013