OFFSET
1,6
FORMULA
a(n) = Sum_{i=1..floor(n/2)} ( i*(n-i) mod n ) * c(i) * c(n-i), where c is the prime characteristic (A010051).
EXAMPLE
a(16) = 14; (3*13 mod 16) + (5*11 mod 16) = 7 + 7 = 14.
MATHEMATICA
Table[Sum[(PrimePi[i] - PrimePi[i - 1]) (PrimePi[n - i] - PrimePi[n - i - 1]) Mod[i (n - i), n], {i, Floor[n/2]}], {n, 80}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Nov 07 2020
STATUS
approved