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

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A338769 Sum of the remainders (p*q mod n) with p,q prime, p + q = n and p < q. 2
0, 0, 0, 0, 1, 0, 3, 7, 5, 1, 0, 11, 9, 5, 11, 14, 0, 16, 15, 22, 17, 32, 0, 69, 21, 20, 0, 22, 0, 51, 27, 46, 29, 49, 0, 80, 0, 27, 35, 101, 0, 80, 39, 81, 41, 91, 0, 163, 45, 112, 0, 105, 0, 139, 51, 133, 0, 87, 0, 162, 57, 64, 59, 179, 0, 204, 0, 78, 65, 241, 0, 258, 69 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,7

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

FORMULA

a(n) = Sum_{i=1..floor((n-1)/2)} ( i*(n-i) mod n ) * c(i) * c(n-i), where c is the prime characteristic (A010051).

EXAMPLE

a(14) = (3*11 mod 14) = 5. We don't count (7*7 mod 14) since we have p < q.

MAPLE

f:= proc(n) local L;

   if n::odd then if isprime(n-2) then n-4 else 0 fi

   else

     add((-x^2) mod n, x = select(t -> isprime(t) and isprime(n-t), [seq(i, i=3..(n-1)/2, 2)]))

   fi

end proc:

map(f, [$1..100]); # Robert Israel, Nov 25 2020

MATHEMATICA

Table[Sum[(PrimePi[i] - PrimePi[i - 1]) (PrimePi[n - i] - PrimePi[n - i - 1]) Mod[i (n - i), n], {i, Floor[(n - 1)/2]}], {n, 80}]

CROSSREFS

Cf. A010051, A338768.

Sequence in context: A322931 A096627 A065084 * A132742 A267317 A210641

Adjacent sequences:  A338766 A338767 A338768 * A338770 A338771 A338772

KEYWORD

nonn

AUTHOR

Wesley Ivan Hurt, Nov 07 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 30 04:10 EST 2021. Contains 349417 sequences. (Running on oeis4.)