cp's OEIS Frontend

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.

A339640 a(n) = (A062772(n) + A054270(n)) / 2 - A001248(n).

This page as a plain text file.
%I A339640 #20 Nov 24 2024 13:59:28
%S A339640 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,
%T A339640 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,
%U A339640 -4,-2,3,1,-8,-4,1,-1,-4,10,-2,15,8,10,2
%N A339640 a(n) = (A062772(n) + A054270(n)) / 2 - A001248(n).
%C A339640 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.
%H A339640 Robert Israel, <a href="/A339640/b339640.txt">Table of n, a(n) for n = 1..10000</a>
%F A339640 a(n) = (nextprime(prime(n)^2) + precprime(prime(n)^2)) / 2 - prime(n)^2.
%e A339640 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.
%p A339640 f:= p -> (nextprime(p^2) + prevprime(p^2))/2 - p^2:
%p A339640 map(f, [seq(ithprime(i),i=1..100)]); # _Robert Israel_, Nov 24 2024
%t A339640 Array[(Total@ NextPrime[#, {-1, 1}])/2 - # &[Prime[#]^2] &, 73] (* _Michael De Vlieger_, Dec 11 2020 *)
%o A339640 (PARI) forprime(n = 2, 370, print1((nextprime(n^2) + precprime(n^2)) / 2 - n^2", "))
%Y A339640 Cf. A000040, A001248, A054270, A062772, A123993.
%K A339640 sign
%O A339640 1,8
%A A339640 _Dimitris Valianatos_, Dec 11 2020