OFFSET
1,3
COMMENTS
a(n) ~ n * Prod[p prime, (1-2/p^2) * Prod[p^2|n, (p^2-1)/(p^2-2)]].
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
P. Pollack, Analytic and Combinatorial Number Theory, Course Notes, p. 122, 202. [?Broken link]
P. Pollack, Analytic and Combinatorial Number Theory, Course Notes, p. 122, 202.
FORMULA
a(n) = Sum_{k=1..n-1} (mu(k)*mu(n-k))^2. - Benoit Cloitre, Sep 24 2006
G.f.: ( Sum_{k>=1} mu(k)^2*x^k )^2, where mu(k) is the Moebius function (A008683). - Ilya Gutkovskiy, Dec 28 2016
EXAMPLE
a(12)=7 because 12=1+11=2+10=5+7=6+6=7+5=10+2=11+1.
MATHEMATICA
Join[{0}, Table[Sum[(MoebiusMu[k]*MoebiusMu[n - k + 1])^2, {k, 1, n}], {n, 1, 50}]] (* G. C. Greubel, Dec 28 2016 *)
PROG
(PARI) a(n) = sum(k=1, n-1, (moebius(k)*moebius(n-k))^2) \\ Indranil Ghosh, Mar 10 2017
(PARI) a(n)=my(s); forsquarefree(k=1, n-1, s+=issquarefree(n-k)); s \\ Charles R Greathouse IV, Jan 08 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Ralf Stephan, Aug 31 2004
STATUS
approved