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.

A054525 Triangle T(n,k): T(n,k) = mu(n/k) if k divides n, T(n,k) = 0 otherwise (n >= 1, 1 <= k <= n).

Original entry on oeis.org

1, -1, 1, -1, 0, 1, 0, -1, 0, 1, -1, 0, 0, 0, 1, 1, -1, -1, 0, 0, 1, -1, 0, 0, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 0, 0, 1, 1, -1, 0, 0, -1, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, -1, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

N. J. A. Sloane, Apr 09 2000

Keywords

Comments

A051731 = the inverse of this triangle = A129372 * A115361. - Gary W. Adamson, Apr 15 2007
If a column T(n,0)=0 is added, these are the coefficients of the necklace polynomials multiplied by n [Moree, Metropolis]. - R. J. Mathar, Nov 11 2008

Examples

			Triangle (with rows n >= 1 and columns k >= 1) begins as follows:
   1;
  -1,  1;
  -1,  0,  1;
   0, -1,  0,  1;
  -1,  0,  0,  0,  1;
   1, -1, -1,  0,  0,  1;
  -1,  0,  0,  0,  0,  0,  1;
   0,  0,  0, -1,  0,  0,  0,  1; ...
Matrix inverse is triangle A051731:
  1;
  1, 1;
  1, 0, 1;
  1, 1, 0, 1;
  1, 0, 0, 0, 1;
  1, 1, 1, 0, 0, 1;
  1, 0, 0, 0, 0, 0, 1;
  1, 1, 0, 1, 0, 0, 0, 1; ...
		

Crossrefs

Programs

  • Maple
    A054525 := proc(n,k)
        if n mod k = 0 then
            numtheory[mobius](n/k) ;
        else
            0 ;
        end if;
    end proc: # R. J. Mathar, Oct 21 2012
  • Mathematica
    t[n_, k_] := If[Divisible[n, k], MoebiusMu[n/k ], 0]; Table[t[n, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jan 14 2014 *)
  • PARI
    tabl(nn) = {T = matrix(nn, nn, n, k, if (! (n % k), moebius(n/k), 0)); for (n=1, nn, for (k=1, n, print1(T[n, k], ", ");); print(););} \\ Michel Marcus, Mar 28 2015
    
  • PARI
    row(n) = Vecrev(sumdiv(n, d, moebius(d)*x^(n/d))/x); \\ Michel Marcus, Aug 24 2021
    
  • Python
    from math import isqrt, comb
    from sympy import mobius
    def A054525(n): return 0 if (a:=(m:=isqrt(k:=n<<1))+(k>m*(m+1)))%(b:=n-comb(a,2)) else mobius(a//b) # Chai Wah Wu, Nov 13 2024

Formula

Matrix inverse of triangle A051731, where A051731(n, k) = 1 if k|n, 0 otherwise. - Paul D. Hanna, Jan 09 2006
Equals = A129360 * A115359 as infinite lower triangular matrices. - Gary W. Adamson, Apr 15 2007
Bivariate g.f.: Sum_{n, k >= 1} T(n, k)*x^n*y^k = Sum_{m >= 1} mu(m)*x^m*y/(1 - x^m*y). - Petros Hadjicostas, Jun 25 2019