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!)
A331764 a(n) = ((p-1)^3 - (p-1)^2)/4 where p is the n-th prime. 1

%I #26 Aug 30 2021 21:40:28

%S 0,1,12,45,225,396,960,1377,2541,5292,6525,11340,15600,18081,23805,

%T 34476,47937,53100,70785,84525,92016,117117,136161,168432,218880,

%U 247500,262701,294945,312012,348096,496125,545025,624240,652257,804972,838125,943020

%N a(n) = ((p-1)^3 - (p-1)^2)/4 where p is the n-th prime.

%H Alois P. Heinz, <a href="/A331764/b331764.txt">Table of n, a(n) for n = 1..10000</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PrimeSums.html">Prime Sum</a>

%F Theorem: a(n) = Sum_{i=1..p-1, j=1..p-1} floor(i*j/p). The proof is based on the formula for p-g-c-d of Marcelo Polezzi. - _Jean-Claude Babois_

%F a(n) == 0 (mod 3) for n >= 3. - _Hugo Pfoertner_, Aug 23 2021

%p a:= n-> (p-> ((p-1)^3-(p-1)^2)/4)(ithprime(n)):

%p seq(a(n), n=1..40); # _Alois P. Heinz_, Feb 05 2020

%t Table[((Prime[n] - 1)^3 - (Prime[n] - 1)^2)/4, {n, 20}] (* _Eric W. Weisstein_, Aug 22 2021 *)

%t Table[((Prime[n] - 2) (Prime[n] - 1)^2)/4, {n, 20}] (* _Eric W. Weisstein_, Aug 22 2021 *)

%t Table[Times @@ (Prime[n] - {1, 1, 2})/4, {n, 20}] (* _Eric W. Weisstein_, Aug 22 2021 *)

%t Table[Sum[Floor[i j/Prime[n]], {i, Prime[n] - 1}, {j, Prime[n] - 1}], {n, 20}] (* _Eric W. Weisstein_, Aug 22 2021 *)

%K nonn

%O 1,3

%A _N. J. A. Sloane_, Feb 05 2020 following a suggestion from _Jean-Claude Babois_.

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 August 11 16:53 EDT 2024. Contains 375073 sequences. (Running on oeis4.)