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-4 of 4 results.

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

A077049 Left summatory matrix, T, by antidiagonals upwards.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Oct 22 2002

Keywords

Comments

If S = (s(1), s(2), ...) is a sequence written as a column vector, then T*S is the summatory sequence of S; i.e., its n-th term is Sum_{k|n} s(k). T is the inverse of the left Moebius transformation matrix, A077050. Except for the first term in some cases, column 1 of T^(-2) is A007427, column 1 of T^(-1) is A008683, Column c of T^2 is A000005, column 1 of T^3 is A007425.
This is essentially the same as A051731, which includes only the triangle. Note that the standard in the OEIS is left to right antidiagonals, which would make this the right summatory matrix, and A077051 the left one. - Franklin T. Adams-Watters, Apr 08 2009
From Gary W. Adamson, Apr 28 2010: (Start)
As defined with antidiagonals of the array = the triangle shown in the example section. Row sums of this triangle = A032741 (with a different offset): 1, 1, 2, 1, 3, 1, 3, ...
Let the triangle = M. Then lim_{n->inf} M^n = A002033, the left-shifted vector considered as a sequence: (1, 1, 1, 2, 1, 3, 1, 4, 2, 3, 1, 8, ...). (End)

Examples

			T(4,2) = 1 since 2 divides 4. Northwest corner:
  1 0 0 0 0 0
  1 1 0 0 0 0
  1 0 1 0 0 0
  1 1 0 1 0 0
  1 0 0 0 1 0
  1 1 1 0 0 1
From _Gary W. Adamson_, Apr 28 2010: (Start)
First few rows of the triangle (when T is read by antidiagonals upwards):
  1;
  1, 0;
  1, 1, 0;
  1, 0, 0, 0;
  1, 1, 1, 0, 0;
  1, 0, 0, 0, 0, 0;
  1, 1, 0, 1, 0, 0, 0;
  1, 0, 1, 0, 0, 0, 0, 0;
  1, 1, 0, 0, 1, 0, 0, 0, 0;
  ... (End)
		

Crossrefs

Cf. A051731, A077050, A077051, A077052, A000005 (row sums).
Cf. A032741, A002033. - Gary W. Adamson, Apr 28 2010

Programs

  • Maple
    A077049 := proc(n,k)
        if modp(n,k) = 0 then
            1;
        else
            0 ;
        end if;
    end proc:
    for d from 2 to 10 do
        for k from 1 to d-1 do
            n := d-k ;
            printf("%d,",A077049(n,k)) ;
        end do:
    end do: # R. J. Mathar, Jul 22 2017
  • Mathematica
    With[{nn = 14}, DeleteCases[#, -1] & /@ Transpose@ Table[Take[#, nn] &@ Flatten@ Join[ConstantArray[-1, k - 1], ConstantArray[Reverse@ IntegerDigits[2^(k - 1), 2], Ceiling[(nn - k + 1)/k]]], {k, nn}]] // Flatten (* Michael De Vlieger, Jul 22 2017 *)
  • PARI
    nn=10; matrix(nn, nn, n, k, if (n % k, 0, 1)) \\ Michel Marcus, May 21 2015
    
  • Python
    def T(n, k):
        return 1 if n%k==0 else 0
    for n in range(1, 11): print([T(n - k + 1, k) for k in range(1, n + 1)]) # Indranil Ghosh, Jul 22 2017

Formula

T(n,k)=1 if k|n, otherwise T(n,k)=0, k >= 1, n >= 1.
From Boris Putievskiy, May 08 2013: (Start)
As table T(n,k) = floor(k/n) - floor((k-1)/n).
As linear sequence a(n) = floor(A004736(n)/A002260(n)) - floor((A004736(n)-1)/A002260(n)); a(n) = floor(j/i)-floor((j-1)/i), where i=n-t*(t+1)/2, j=(t*t+3*t+4)/2-n, t=floor((-1+sqrt(8*n-7))/2). (End)

Extensions

Name edited by Petros Hadjicostas, Jul 27 2019

A077051 Right summatory matrix, T, by antidiagonals.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Oct 22 2002

Keywords

Comments

If S=(s(1),s(2),...) is a sequence written as a row vector, then S*T is the summatory sequence of S; i.e. its n-th term is Sum{s(k): k|n}. T is the transpose of the left summatory matrix, A077049; T is the inverse of the right Moebius transformation matrix. See A077049 for further properties.
This is essentially the same as A051731, which includes only the triangle. Note that the standard in the OEIS is left to right antidiagonals, which would make this the left summatory matrix, and A077049 the right one. - Franklin T. Adams-Watters, Apr 08 2009
Sum of column k is A000005. - Geoffrey Critzer, Mar 29 2015

Examples

			Northwest corner:
1 1 1 1 1 1
0 1 0 1 0 1
0 0 1 0 0 1
0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 1
		

Crossrefs

Programs

  • Mathematica
    (* returns the northwest corner *) nn = 20; Table[PadRight[Drop[CoefficientList[Series[x^n/(1 - x^n), {x, 0, nn}], x],1], nn], {n, 1, nn}] // Grid (* Geoffrey Critzer, Mar 29 2015 *)

Formula

T(n, k)=1 if n|k else T(n, k)=0.
From Boris Putievskiy, May 08 2013: (Start)
As table T(n,k)= floor(n/k)-floor((n-1)/k).
As linear sequence a(n) = floor(A002260(n)/A004736(n)) - floor((A002260(n)-1)/A004736(n));
a(n) = floor(i/j) - floor((i-1)/j), where i=n-t*(t+1)/2, j=(t*t+3*t+4)/2-n, t=floor((-1+sqrt(8*n-7))/2). (End)
G.f. for row n: x^n/(1-x^n). - Geoffrey Critzer, Mar 29 2015

A077052 Right Moebius transformation matrix, M, by antidiagonals.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Oct 22 2002

Keywords

Comments

If S=(s(1),s(2),...) is a sequence written as a row vector, then S*M is the Moebius transform of S; i.e. its n-th term is Sum{mu(k)*s(k): k|n}. M is the transpose of the left Moebius transformation matrix, A077050.

Examples

			Northwest corner:
1 -1 -1 0 -1 1
0 1 0 -1 0 -1
0 0 1 0 0 -1
0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 1
		

Crossrefs

Formula

M=T^(-1), where T is the right summatory matrix, A077051.
Showing 1-4 of 4 results.