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 A056927 #37 Jul 02 2025 16:02:00 %S A056927 1,2,3,2,5,2,3,2,3,8,5,2,3,2,5,6,7,2,3,2,5,6,5,6,3,2,11,2,13,8,3,2,3, %T A056927 2,5,2,5,10,3,12,5,2,3,8,3,2,7,2,23,8,5,6,7,2,15,20,3,12,7,2,11,2,3,6, %U A056927 7,6,3,2,11,2,5,6,5,2,27,2,5,12,3,8,5,6,13,6,3,8,3,2,7,8,3,2,5,12,7,6,3 %N A056927 Difference between n^2 and largest prime less than n^2. %C A056927 Legendre's conjecture (still open) that there is always a prime between n^2 and (n+1)^2 is equivalent to the conjecture that a(n) < 2n-1 for all n>1. %C A056927 Will the most common subsequence seen be (2,3,2)? - _Bill McEachen_, Jan 30 2011 %H A056927 T. D. Noe, <a href="/A056927/b056927.txt">Table of n, a(n) for n=2..10000</a> %F A056927 a(n) = A000290(n)-A053001(n). %e A056927 a(4)=3 because largest prime less than 4^2 is 13 and 16-13=3. %p A056927 A056927 := n-> n^2-prevprime(n^2); seq(A056927(n), n=2..100); %t A056927 Table[n2=n^2;n2-NextPrime[n2,-1],{n,2,100}] (* _Vladimir Joseph Stephan Orlovsky_, Mar 09 2011 *) %o A056927 (PARI){my(maxx=10000);n=2;ptr=2;while(n<=maxx,q=n^2;pp=precprime(q); diff=q-pp;print(ptr," ",diff);n++;ptr++ );} \\ _Bill McEachen_, May 07 2014 %Y A056927 Cf. A053001, A056929, A056931. %K A056927 easy,nonn %O A056927 2,2 %A A056927 _Henry Bottomley_, Jul 12 2000 %E A056927 More terms from _James Sellers_, Jul 13 2000