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 A038703 #21 Feb 16 2025 08:32:38 %S A038703 3,5,17,29,37,127 %N A038703 Primes p such that p^2 mod q is odd, where q is the previous prime. %C A038703 The next term if it exists is > 32452843 = 2000000th prime. Can someone prove this sequence is complete? - _Olivier Gérard_, Jun 26 2001 %C A038703 To prove that 127 is the last prime, we need to show that prime gaps satisfy prime(k)-prime(k-1)<sqrt(prime(k-1)) for k>31. Although it is easy to verify this inequality for all known prime gaps, there is no proof for all gaps. - _T. D. Noe_, Jul 25 2006 %H A038703 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PrimeGaps.html">Prime Gaps</a> %F A038703 Prime(k) is in the sequence if prime(k)^2 (mod prime(k-1)) is odd. %e A038703 The first prime with a prime lower than itself is 3. This squared is 9, which when divided by the previous prime 2 leaves remainder 1, which is odd. So 3 is in the sequence. 11 is not in the sequence because 11^2, when divided by the previous prime 7, leaves a remainder of 121 (mod 7) = 2, which is even. %t A038703 Prime /@ Select[ Range[ 2, 100 ], OddQ[ Mod[ Prime[ # ]^2, Prime[ # - 1 ] ] ] & ] %t A038703 Transpose[Select[Partition[Prime[Range[50]],2,1],OddQ[PowerMod[Last[#],2, First[#]]]&]] [[2]] (* _Harvey P. Dale_, May 31 2012 *) %o A038703 (PARI) isok(p) = isprime(p) && (p>2) && (lift(Mod(p, precprime(p-1))^2) % 2); \\ _Michel Marcus_, Mar 05 2023 %Y A038703 Cf. A038702. %Y A038703 Cf. A058188 (number of primes between prime(n) and prime(n)+sqrt(prime(n))). %K A038703 nonn,more %O A038703 1,1 %A A038703 _Neil Fernandez_, May 01 2000 %E A038703 More terms from _Olivier Gérard_, Jun 26 2001