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.

Showing 1-2 of 2 results.

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

Original entry on oeis.org

0, 0, 0, 7, 9, 11, 13, 28, 45, 51, 57, 80, 88, 96, 104, 135, 145, 180, 192, 231, 245, 259, 273, 320, 369, 387, 440, 495, 517, 539, 561, 624, 648, 672, 696, 767, 793, 819, 845, 924, 952, 980, 1008, 1095, 1184, 1216, 1248, 1343, 1440, 1539, 1577, 1680, 1720
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 11 2003

Keywords

Comments

A081238(n) + a(n) + A081240(n) = n^2;
a(n) = a(n-1) + 2*n + 1 iff mu(n) = 0.

Examples

			n mu(n) ... n: 1 2 3 4 5 6 7 8
- ------ .... |----------------
1 .. +1 ..... | + - - 0 - + - 0
2 .. -1 ..... | - + + 0 + - + 0
3 .. -1 ..... | - + + 0 + - + 0
4 ... 0 ..... | 0 0 0 0 0 0 0 0
5 .. -1 ..... | - + + 0 + - + 0 a(8)=28, as there are
6 .. +1 ..... | + - - 0 - + - 0 28 '0's in the 8x8-square
7 .. -1 ..... | - + + 0 + - + 0
8 ... 0 ..... | 0 0 0 0 0 0 0 0.
		

Crossrefs

Cf. A057627.

Programs

  • Haskell
    a081239 n = length [() | u <- [1..n], v <- [1..n],
                             a008683 u * a008683 v == 0]
    -- Reinhard Zumkeller, Aug 03 2012

Formula

a(n) = n^2 - A013928(n+1)^2. - Vladeta Jovovic, Mar 12 2003

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

Original entry on oeis.org

0, 2, 4, 4, 6, 12, 16, 16, 16, 24, 30, 30, 36, 48, 60, 60, 70, 70, 80, 80, 96, 112, 126, 126, 126, 144, 144, 144, 160, 176, 192, 192, 216, 240, 264, 264, 286, 312, 338, 338, 364, 390, 416, 416, 416, 448, 476, 476, 476, 476, 510, 510, 540, 540, 576, 576, 612, 648
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 11 2003

Keywords

Examples

			n  mu(n)  n: 1 2 3 4 5 6 7 8
-  -----   +----------------->
1   +1     | + - - 0 - + - 0
2   -1     | - + + 0 + - + 0
3   -1     | - + + 0 + - + 0
4    0     | 0 0 0 0 0 0 0 0
5   -1     | - + + 0 + - + 0  a(8)=16, as there are
6   +1     | + - - 0 - + - 0  16 '-1's in the 8 X 8 square
7   -1     | - + + 0 + - + 0  (represented as '-')
8    0     | 0 0 0 0 0 0 0 0
		

Crossrefs

Programs

  • Haskell
    a081238 n = length [() | u <- [1..n], v <- [1..n],
                             a008683 u * a008683 v == -1]
    -- Reinhard Zumkeller, Aug 03 2012
  • Maple
    Nplus:= 0:
    Nminus:=0:
    for n from 1 to 100 do
      v:= numtheory:-mobius(n);
      if v = 1 then Nplus:= Nplus+1
      elif v = -1 then Nminus:= Nminus+1
      fi;
      A[n]:= 2*Nplus*Nminus;
    od:
    seq(A[n],n=1..100); # Robert Israel, Jan 08 2018
  • Mathematica
    Nplus = Nminus = 0;
    For[n = 1, n <= 100, n++, v = MoebiusMu[n];
         If[v == 1, Nplus++,
         If[v == -1, Nminus++]];
         a[n] = 2 Nplus Nminus];
    Array[a, 100] (* Jean-François Alcover, Dec 16 2021, after Robert Israel *)

Formula

a(n) + A081239(n) + A081240(n) = n^2;
a(n) = a(n-1) iff mu(n) = 0.
a(n) = 2*A070548(n)*A070549(n). - Robert Israel, Jan 08 2018
Showing 1-2 of 2 results.