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 A038702 #39 Aug 13 2025 08:41:34 %S A038702 1,1,4,2,4,3,4,16,13,4,5,16,4,16,36,36,4,36,16,4,36,16,36,64,16,4,16, %T A038702 4,16,83,16,36,4,100,4,36,36,16,36,36,4,100,4,16,4,144,144,16,4,16,36, %U A038702 4,100,36,36,36,4,36,16,4,100,196,16,4 %N A038702 Prime(n)^2 mod prime(n-1). %C A038702 a(n+1) = n-th prime gap squared mod the n-th prime = A076821(n) mod A000040(n). Probably a(n) = A076821(n+1) for n > 31. This holds up to 4 * 10^18. - _Charles R Greathouse IV_, Apr 17 2012 %H A038702 Vincenzo Librandi, <a href="/A038702/b038702.txt">Table of n, a(n) for n = 2..10000</a> %e A038702 To get a(4): square the fourth prime to get 7^2 = 49. The remainder when this is divided by the third prime, 5, is 4. So a(3) = 4. %p A038702 A038702 := proc(n) %p A038702 modp( ithprime(n)^2,ithprime(n-1)) ; %p A038702 end proc: # _R. J. Mathar_, Jan 09 2015 %t A038702 Table[Mod[Prime[n+1]^2,Prime[n]],{n,5!}] (* _Vladimir Joseph Stephan Orlovsky_, Apr 26 2010 *) %t A038702 Table[PowerMod[Prime[n],2,Prime[n-1]],{n,2,70}] (* _Harvey P. Dale_, Mar 22 2012 *) %o A038702 (PARI) a(n)=prime(n)^2%prime(n-1) \\ _Charles R Greathouse IV_, Apr 17 2012 %Y A038702 Cf. A038703. %K A038702 nonn,easy %O A038702 2,3 %A A038702 _Neil Fernandez_, May 01 2000