login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A056929 Difference between n^2 and average of smallest prime greater than n^2 and largest prime less than n^2. 7
0, 0, 1, -1, 2, -1, 0, 0, 1, 1, 0, -1, 1, 0, 2, 1, 0, -2, 1, 0, 1, -3, 2, 0, 1, -1, 4, -5, 3, 1, -2, 0, -2, -1, 2, -1, 1, 4, 1, 0, -4, -5, -5, 3, -5, -1, 1, -4, 10, 0, 1, -2, 3, -5, 7, 9, -2, 1, 0, -2, 4, -9, 0, 1, 3, 1, -5, -10, 4, -4, 0, 1, 2, -6, 12, -4, 0, 3, -9, 3, -2, -2, 6, 1, -6, 2, -3 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,5

LINKS

Hugo Pfoertner, Table of n, a(n) for n = 2..10000

FORMULA

a(n) = A000290(n)-A056928(n).

a(n) = (A056927(n)-A053000(n))/2.

EXAMPLE

a(4)=1 because smallest prime greater than 4^2 is 17, largest prime less than 4^2 is 13, average of 17 and 13 is 15 and 16-15=1

MAPLE

with(numtheory): A056929 := n-> n^2-(prevprime(n^2)+nextprime(n^2))/2);

MATHEMATICA

Array[# - Mean@ {NextPrime[#], NextPrime[#, -1]} &[#^2] &, 87, 2] (* Michael De Vlieger, May 20 2018 *)

PROG

(PARI) a(n) = n^2 - (nextprime(n^2) + precprime(n^2))/2; \\ Michel Marcus, May 20 2018

CROSSREFS

Cf. A007491, A053000, A053001, A056927, A056928, A056930, A056931.

Sequence in context: A328556 A321888 A321750 * A304096 A151692 A280829

Adjacent sequences:  A056926 A056927 A056928 * A056930 A056931 A056932

KEYWORD

easy,sign

AUTHOR

Henry Bottomley, Jul 12 2000

EXTENSIONS

More terms from James A. Sellers, Jul 13 2000

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 8 08:22 EDT 2020. Contains 336292 sequences. (Running on oeis4.)