cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A081238 #19 Dec 16 2021 04:13:41
%S A081238 0,2,4,4,6,12,16,16,16,24,30,30,36,48,60,60,70,70,80,80,96,112,126,
%T A081238 126,126,144,144,144,160,176,192,192,216,240,264,264,286,312,338,338,
%U A081238 364,390,416,416,416,448,476,476,476,476,510,510,540,540,576,576,612,648
%N A081238 #{(i,j): mu(i)*mu(j) = -1, 1 <= i <= n, 1 <= j <= n}, where mu=A008683 (Moebius function).
%H A081238 Reinhard Zumkeller, <a href="/A081238/b081238.txt">Table of n, a(n) for n = 1..500</a>
%F A081238 a(n) + A081239(n) + A081240(n) = n^2;
%F A081238 a(n) = a(n-1) iff mu(n) = 0.
%F A081238 a(n) = 2*A070548(n)*A070549(n). - _Robert Israel_, Jan 08 2018
%e A081238 n  mu(n)  n: 1 2 3 4 5 6 7 8
%e A081238 -  -----   +----------------->
%e A081238 1   +1     | + - - 0 - + - 0
%e A081238 2   -1     | - + + 0 + - + 0
%e A081238 3   -1     | - + + 0 + - + 0
%e A081238 4    0     | 0 0 0 0 0 0 0 0
%e A081238 5   -1     | - + + 0 + - + 0  a(8)=16, as there are
%e A081238 6   +1     | + - - 0 - + - 0  16 '-1's in the 8 X 8 square
%e A081238 7   -1     | - + + 0 + - + 0  (represented as '-')
%e A081238 8    0     | 0 0 0 0 0 0 0 0
%p A081238 Nplus:= 0:
%p A081238 Nminus:=0:
%p A081238 for n from 1 to 100 do
%p A081238   v:= numtheory:-mobius(n);
%p A081238   if v = 1 then Nplus:= Nplus+1
%p A081238   elif v = -1 then Nminus:= Nminus+1
%p A081238   fi;
%p A081238   A[n]:= 2*Nplus*Nminus;
%p A081238 od:
%p A081238 seq(A[n],n=1..100); # _Robert Israel_, Jan 08 2018
%t A081238 Nplus = Nminus = 0;
%t A081238 For[n = 1, n <= 100, n++, v = MoebiusMu[n];
%t A081238      If[v == 1, Nplus++,
%t A081238      If[v == -1, Nminus++]];
%t A081238      a[n] = 2 Nplus Nminus];
%t A081238 Array[a, 100] (* _Jean-François Alcover_, Dec 16 2021, after _Robert Israel_ *)
%o A081238 (Haskell)
%o A081238 a081238 n = length [() | u <- [1..n], v <- [1..n],
%o A081238                          a008683 u * a008683 v == -1]
%o A081238 -- _Reinhard Zumkeller_, Aug 03 2012
%Y A081238 Cf. A070548, A070549, A081239, A081240.
%K A081238 nonn
%O A081238 1,2
%A A081238 _Reinhard Zumkeller_, Mar 11 2003