login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A081238 #{(i,j): mu(i)*mu(j) = -1, 1 <= i <= n, 1 <= j <= n}, where mu=A008683 (Moebius function). 3

%I #19 Dec 16 2021 04:13:41

%S 0,2,4,4,6,12,16,16,16,24,30,30,36,48,60,60,70,70,80,80,96,112,126,

%T 126,126,144,144,144,160,176,192,192,216,240,264,264,286,312,338,338,

%U 364,390,416,416,416,448,476,476,476,476,510,510,540,540,576,576,612,648

%N #{(i,j): mu(i)*mu(j) = -1, 1 <= i <= n, 1 <= j <= n}, where mu=A008683 (Moebius function).

%H Reinhard Zumkeller, <a href="/A081238/b081238.txt">Table of n, a(n) for n = 1..500</a>

%F a(n) + A081239(n) + A081240(n) = n^2;

%F a(n) = a(n-1) iff mu(n) = 0.

%F a(n) = 2*A070548(n)*A070549(n). - _Robert Israel_, Jan 08 2018

%e n mu(n) n: 1 2 3 4 5 6 7 8

%e - ----- +----------------->

%e 1 +1 | + - - 0 - + - 0

%e 2 -1 | - + + 0 + - + 0

%e 3 -1 | - + + 0 + - + 0

%e 4 0 | 0 0 0 0 0 0 0 0

%e 5 -1 | - + + 0 + - + 0 a(8)=16, as there are

%e 6 +1 | + - - 0 - + - 0 16 '-1's in the 8 X 8 square

%e 7 -1 | - + + 0 + - + 0 (represented as '-')

%e 8 0 | 0 0 0 0 0 0 0 0

%p Nplus:= 0:

%p Nminus:=0:

%p for n from 1 to 100 do

%p v:= numtheory:-mobius(n);

%p if v = 1 then Nplus:= Nplus+1

%p elif v = -1 then Nminus:= Nminus+1

%p fi;

%p A[n]:= 2*Nplus*Nminus;

%p od:

%p seq(A[n],n=1..100); # _Robert Israel_, Jan 08 2018

%t Nplus = Nminus = 0;

%t For[n = 1, n <= 100, n++, v = MoebiusMu[n];

%t If[v == 1, Nplus++,

%t If[v == -1, Nminus++]];

%t a[n] = 2 Nplus Nminus];

%t Array[a, 100] (* _Jean-François Alcover_, Dec 16 2021, after _Robert Israel_ *)

%o (Haskell)

%o a081238 n = length [() | u <- [1..n], v <- [1..n],

%o a008683 u * a008683 v == -1]

%o -- _Reinhard Zumkeller_, Aug 03 2012

%Y Cf. A070548, A070549, A081239, A081240.

%K nonn

%O 1,2

%A _Reinhard Zumkeller_, Mar 11 2003

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 10:29 EDT 2024. Contains 371905 sequences. (Running on oeis4.)