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!)
A339640 a(n) = (A062772(n) + A054270(n)) / 2 - A001248(n). 0
0, 0, 1, 1, -1, 1, -1, 2, 3, 5, -1, 1, 0, 5, 1, 2, -1, 2, -1, 4, -1, -3, 2, 2, -1, 1, 1, 8, -4, 3, 4, 2, -4, 5, 10, -4, -4, -2, -1, 8, -1, -1, 5, -1, 3, -7, 4, 4, 1, 2, 1, 4, 5, 8, 8, 8, -1, 2, -4, -2, 3, 1, -8, -4, 1, -1, -4, 10, -2, 15, 8, 10, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,8

COMMENTS

Conjecture: The partial sums of this sequence are greater than or equal to zero. This means that the squares of the prime numbers are smaller than the average of the previous and the next prime number most of the time.

LINKS

Table of n, a(n) for n=1..73.

FORMULA

a(n) = (nextprime(prime(n)^2) + precprime(prime(n)^2)) / 2 - prime(n)^2.

EXAMPLE

For n = 10 prime(10)^2 = 29^2 = 841. The previous prime of 841 is 839 and the next 853. The average of 839 and 853 is (839 + 853)/2 = 846. So a(10) = 846 - 841 = 5.

MATHEMATICA

Array[(Total@ NextPrime[#, {-1, 1}])/2 - # &[Prime[#]^2] &, 73] (* Michael De Vlieger, Dec 11 2020 *)

PROG

(PARI) forprime(n = 2, 370, print1((nextprime(n^2) + precprime(n^2)) / 2 - n^2", "))

CROSSREFS

Cf. A000040, A001248, A054270, A062772, A123993.

Sequence in context: A031067 A300392 A335706 * A031027 A134730 A126046

Adjacent sequences:  A339637 A339638 A339639 * A339641 A339642 A339643

KEYWORD

sign

AUTHOR

Dimitris Valianatos, Dec 11 2020

STATUS

approved

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 October 1 02:38 EDT 2022. Contains 357134 sequences. (Running on oeis4.)