The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A056927 Difference between n^2 and largest prime less than n^2. 9

%I #36 Aug 02 2020 02:24:10

%S 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 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 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 Difference between n^2 and largest prime less than n^2.

%C 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 Will the most common subsequence seen be (2,3,2)? - _Bill McEachen_, Jan 30 2011

%H T. D. Noe, <a href="/A056927/b056927.txt">Table of n, a(n) for n=2..10000</a>

%F a(n) = A000290(n)-A053001(n).

%e a(4)=3 because largest prime less than 4^2 is 13 and 16-13=3.

%p A056927 := n-> n^2-prevprime(n^2); seq(A056927(n), n=2..100);

%t Table[n2=n^2;n2-NextPrime[n2,-1],{n,2,100}] (* _Vladimir Joseph Stephan Orlovsky_, Mar 09 2011 *)

%o (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 Cf. A053001, A056929, A056931.

%K easy,nonn

%O 2,2

%A _Henry Bottomley_, Jul 12 2000

%E More terms from _James A. Sellers_, Jul 13 2000

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 7 14:50 EDT 2024. Contains 373202 sequences. (Running on oeis4.)