OFFSET
1,3
COMMENTS
Terms are even or 1: range = A004275. [Reinhard Zumkeller, Sep 26 2011]
REFERENCES
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Ernesto Bruno Cossi, Joachim Herzog, Paul R. Smith and Richard Stong, Problem 6623, Amer. Math. Monthly, 99 (1992), 573-575.
R. G. Wilson v, Letter to N. J. A. Sloane, Oct. 1993
FORMULA
a(n) = Sum_{i=1..n-1} mu(i*(n-i))^2. - Ridouane Oudra, Nov 18 2019
MAPLE
with(numtheory): seq(add(mobius(i*(n-i))^2, i=1..n-1), n=1..80); # Ridouane Oudra, Nov 18 2019
MATHEMATICA
a[n_] := Count[ Table[ If[ SquareFreeQ[j] && GCD[j, n] == 1, If[k = n-j; SquareFreeQ[k] && GCD[k, n] == 1, 1]], {j, 1, n-1}], 1]; Table[a[n], {n, 1, 64}](* Jean-François Alcover, Nov 28 2011 *)
PROG
(Haskell)
a007457 n = length [k | k <- [1..n-1], gcd k n == 1, a008966 k == 1,
let j = n - k, gcd j n == 1, a008966 j == 1]
-- Reinhard Zumkeller, Sep 26 2011
(Magma) f:=func<i, n|Gcd(i, n) eq 1 and IsSquarefree(i)>; [0] cat [#[i:i in [1..n-1]| f(i, n) and f(n-i, n) ]:n in [2..70]]; // Marius A. Burtea, Nov 19 2019
(Magma) [0] cat [&+[MoebiusMu(i*(n-i))^2:i in [1..n-1]]:n in [2..70]]; // Marius A. Burtea, Nov 19 2019
CROSSREFS
KEYWORD
nonn,nice,easy
AUTHOR
STATUS
approved