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 A039733 #19 Feb 07 2024 01:22:17 %S A039733 1,2,3,4,4,5,5,6,7,7,8,9,9,10,10,11,11,12,12,12,13,14,15,16,16,16,17, %T A039733 17,17,19,19,20,20,22,22,22,23,24,24,25,25,25,25,26,26,28,30,31,31,31, %U A039733 31,31,31,32,33,33,33,34,35,35,35,37,37,37 %N A039733 a(n)=k such that prime(k) is the prime q<prime(n) for which (prime(n) mod q) is maximal. %H A039733 Ivan Neretin, <a href="/A039733/b039733.txt">Table of n, a(n) for n = 2..10000</a> %t A039733 {1}~Join~Reap[Do[d = 2; r = 0; p = Prime[n]; %t A039733 While[Set[s, Mod[p, Set[q, NextPrime[p/d]] ]]; If[s > r, r = s]; r < q, %t A039733 d++; If[r == s, Sow[PrimePi@ q]]], {n, 3, 1000}] ][[-1, 1]] (* _Michael De Vlieger_, Feb 06 2024 *) %o A039733 (PARI) a(n) = {thek = 0; modmax = 0; pr = prime(n); for(k = 1, n-1, mq = pr % prime(k); if (mq > modmax, modmax = mq; thek = k);); thek;} \\ _Michel Marcus_, Oct 02 2013 %Y A039733 Cf. A039734. %K A039733 nonn %O A039733 2,2 %A A039733 _Clark Kimberling_