# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a007457 Showing 1-1 of 1 %I A007457 M0224 #39 Sep 08 2022 08:44:35 %S A007457 0,1,2,2,2,2,4,4,2,2,4,4,6,4,4,6,8,6,6,6,4,8,8,8,8,8,8,6,10,8,10,10,8, %T A007457 12,8,10,14,12,10,12,16,10,18,14,12,14,16,14,16,14,10,16,20,14,12,16, %U A007457 14,20,18,14,22,20,16,20 %N A007457 Number of (j,k): j+k=n, (j,n)=(k,n)=1, j,k squarefree. %C A007457 Terms are even or 1: range = A004275. [_Reinhard Zumkeller_, Sep 26 2011] %D A007457 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A007457 Reinhard Zumkeller, Table of n, a(n) for n = 1..10000 %H A007457 Ernesto Bruno Cossi, Joachim Herzog, Paul R. Smith and Richard Stong, Problem 6623, Amer. Math. Monthly, 99 (1992), 573-575. %H A007457 R. G. Wilson v, Letter to N. J. A. Sloane, Oct. 1993 %F A007457 a(n) = Sum_{i=1..n-1} mu(i*(n-i))^2. - _Ridouane Oudra_, Nov 18 2019 %p A007457 with(numtheory): seq(add(mobius(i*(n-i))^2, i=1..n-1), n=1..80); # _Ridouane Oudra_, Nov 18 2019 %t A007457 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 *) %o A007457 (Haskell) %o A007457 a007457 n = length [k | k <- [1..n-1], gcd k n == 1, a008966 k == 1, %o A007457 let j = n - k, gcd j n == 1, a008966 j == 1] %o A007457 -- _Reinhard Zumkeller_, Sep 26 2011 %o A007457 (Magma) f:=func; [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 %o A007457 (Magma) [0] cat [&+[MoebiusMu(i*(n-i))^2:i in [1..n-1]]:n in [2..70]]; // _Marius A. Burtea_, Nov 19 2019 %Y A007457 Cf. A004275, A073311. %K A007457 nonn,nice,easy %O A007457 1,3 %A A007457 _N. J. A. Sloane_, _Robert G. Wilson v_ # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE