OFFSET
1,4
COMMENTS
Sum of the slopes of the tangent lines along the left side of the parabola b(x) = 2*n*x-x^2 at prime values of x such that 2n-x is squarefree for x in 0 < x <= n. For example, d/dx 2*n*x-x^2 = 2n-2x. So for a(8), the prime values of x that make 16-x squarefree are x=2,3,5 and so a(8) = 16-2*2 + 16-2*3 + 16-2*5 = 12 + 10 + 6 = 28. - Wesley Ivan Hurt, Mar 25 2018
EXAMPLE
For n = 9, 18 can be partitioned into a squarefree number and a smaller prime in three ways: 15 + 3, 13 + 5, and 11 + 7, so a(9) = (15 - 3) + (13 - 5) + (11 - 7) = 24. - Michael B. Porter, Mar 27 2018
MATHEMATICA
Table[2*Sum[(n - i) (PrimePi[i] - PrimePi[i - 1]) MoebiusMu[2 n - i]^2, {i, n}], {n, 80}]
Table[Total[Abs[Differences[#]]&/@Select[IntegerPartitions[2n, {2}], SquareFreeQ[ #[[1]]] && PrimeQ[#[[2]]]&]], {n, 60}]//Flatten (* Harvey P. Dale, Jan 13 2023 *)
PROG
(PARI) a(n) = 2 * sum(i=1, n, (n-i)*isprime(i)*issquarefree(2*n-i)); \\ Michel Marcus, Mar 26 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Oct 22 2017
STATUS
approved