

A056927


Difference between n^2 and largest prime less than n^2.


9



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, 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, 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
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

2,2


COMMENTS

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) < 2n1 for all n>1.
Will the most common subsequence seen be (2,3,2)?  Bill McEachen, Jan 30 2011


LINKS

T. D. Noe, Table of n, a(n) for n=2..10000


FORMULA

a(n) = A000290(n)A053001(n).


EXAMPLE

a(4)=3 because largest prime less than 4^2 is 13 and 1613=3.


MAPLE

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


MATHEMATICA

Table[n2=n^2; n2NextPrime[n2, 1], {n, 2, 100}] (* Vladimir Joseph Stephan Orlovsky, Mar 09 2011 *)


PROG

(PARI){my(maxx=10000); n=2; ptr=2; while(n<=maxx, q=n^2; pp=precprime(q); diff=qpp; print(ptr, " ", diff); n++; ptr++ ); } \\ Bill McEachen, May 07 2014


CROSSREFS

Cf. A053001, A056929, A056931.
Sequence in context: A217607 A066727 A076606 * A094290 A265111 A101876
Adjacent sequences: A056924 A056925 A056926 * A056928 A056929 A056930


KEYWORD

easy,nonn,changed


AUTHOR

Henry Bottomley, Jul 12 2000


EXTENSIONS

More terms from James A. Sellers, Jul 13 2000


STATUS

approved



