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

A051731 Triangle read by rows: T(n, k) = 1 if k divides n, T(n, k) = 0 otherwise, for 1 <= k <= n.

Original entry on oeis.org

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, 1, 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, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de)

Keywords

Comments

T(n, k) is the number of partitions of n into k equal parts. - Omar E. Pol, Apr 21 2018
This triangle is the lower triangular array L in the LU decomposition of the square array A003989. - Peter Bala, Oct 15 2023

Examples

			The triangle T(n, k) begins:
  n\k 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 ...
  1:  1
  2:  1  1
  3:  1  0  1
  4:  1  1  0  1
  5:  1  0  0  0  1
  6:  1  1  1  0  0  1
  7:  1  0  0  0  0  0  1
  8:  1  1  0  1  0  0  0  1
  9:  1  0  1  0  0  0  0  0  1
  10: 1  1  0  0  1  0  0  0  0  1
  11: 1  0  0  0  0  0  0  0  0  0  1
  12: 1  1  1  1  0  1  0  0  0  0  0  1
  13: 1  0  0  0  0  0  0  0  0  0  0  0  1
  14: 1  1  0  0  0  0  1  0  0  0  0  0  0  1
  15: 1  0  1  0  1  0  0  0  0  0  0  0  0  0  1
  ... Reformatted and extended. - _Wolfdieter Lang_, Nov 12 2014
		

Crossrefs

Cf. A000005 (row sums), A032741(n+2) (diagonal sums).
Cf. A243987 (partial sums per row).
Cf. A134546 (A004736 * T, matrix multiplication).
Variants: A113704, A077049, A077051.

Programs

  • Haskell
    a051731 n k = 0 ^ mod n k
    a051731_row n = a051731_tabl !! (n-1)
    a051731_tabl = map (map a000007) a048158_tabl
    -- Reinhard Zumkeller, Aug 13 2013
    
  • Magma
    [0^(n mod k): k in [1..n], n in [1..17]]; // G. C. Greubel, Jun 22 2024
    
  • Maple
    A051731 := proc(n, k) if n mod k = 0 then 1 else 0 end if end proc:
    # R. J. Mathar, Jul 14 2012
  • Mathematica
    Flatten[Table[If[Mod[n, k] == 0, 1, 0], {n, 20}, {k, n}]]
  • PARI
    for(n=1,17,for(k=1,n,print1(!(n%k)", "))) \\ Charles R Greathouse IV, Mar 14 2012
    
  • Python
    from math import isqrt, comb
    def A051731(n): return int(not (a:=(m:=isqrt(k:=n<<1))+(k>m*(m+1)))%(n-comb(a,2))) # Chai Wah Wu, Nov 13 2024
  • Sage
    A051731_row = lambda n: [int(k.divides(n)) for k in (1..n)]
    for n in (1..17): print(A051731_row(n)) # Peter Luschny, Jan 05 2018
    

Formula

{T(n, k)*k, k=1..n} setminus {0} = divisors(n).
Sum_{k=1..n} T(n, k)*k^i = sigma[i](n), where sigma[i](n) is the sum of the i-th power of the positive divisors of n.
Sum_{k=1..n} T(n, k) = A000005(n).
Sum_{k=1..n} T(n, k)*k = A000203(n).
T(n, k) = T(n-k, k) for k <= n/2, T(n, k) = 0 for n/2 < k <= n-1, T(n, n) = 1.
Rows given by A074854 converted to binary. Example: A074854(4) = 13 = 1101_2; row 4 = 1, 1, 0, 1. - Philippe Deléham, Oct 04 2003
From Paul Barry, Dec 05 2004: (Start)
Binomial transform (product by binomial matrix) is A101508.
Columns have g.f.: x^k/(1-x^(k+1)) (k >= 0). (End)
Matrix inverse of triangle A054525, where A054525(n, k) = MoebiusMu(n/k) if k|n, 0 otherwise. - Paul D. Hanna, Jan 09 2006
From Gary W. Adamson, Apr 15 2007, May 10 2007: (Start)
Equals A129372 * A115361 as infinite lower triangular matrices.
A054525 is the inverse of this triangle (as lower triangular matrix).
This triangle * [1, 2, 3, ...] = sigma(n) (A000203).
This triangle * [1/1, 1/2, 1/3, ...] = sigma(n)/n. (End)
From Reinhard Zumkeller, Nov 01 2009: (Start)
T(n, k) = 0^(n mod k).
T(n, k) = A000007(A048158(n, k)). (End)
From Mats Granvik, Jan 26 2010, Feb 10 2010, Feb 16 2010: (Start)
T(n, k) = A172119(n) mod 2.
T(n, k) = A175105(n) mod 2.
T(n, k) = Sum_{i=1..k-1} (T(n-i, k-1) - T(n-i, k)) for k > 1 and T(n, 1) = 1.
(Jeffrey O. Shallit kindly provided a clarification along with a proof of this formula.) (End)
A049820(n) = number of zeros in n-th row. - Reinhard Zumkeller, Mar 09 2010
The determinant of this matrix where T(n, n) has been swapped with T(1,k) is equal to the n-th term of the Mobius function. - Mats Granvik, Jul 21 2012
T(n, k) = Sum_{y=1..n} Sum_{x=1..n} [GCD((x/y)*(k/n), n) = k]. - Mats Granvik, Dec 17 2023

Extensions

Edited by Peter Luschny, Oct 18 2023

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

A077050 Left Moebius transformation matrix, M, by antidiagonals.

Original entry on oeis.org

1, -1, 0, -1, 1, 0, 0, 0, 0, 0, -1, -1, 1, 0, 0, 1, 0, 0, 0, 0, 0, -1, -1, 0, 1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 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, 0, 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, 0, 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 column vector, then M*S is the Moebius transform of S; i.e. its n-th term is Sum{mu(k)*s(k): k|n}. If s(n)=n, then M*S(n)=phi(n), the Euler totient function, A000010. Row sums: 0 for n>=2.

Examples

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

Crossrefs

Programs

  • PARI
    nn=10; matrix(nn, nn, n, k, if (n % k, 0, 1))^(-1) \\ Michel Marcus, May 21 2015

Formula

M = T^(-1), where T is the left summatory matrix, A077049.

A077478 Rectangular array R read by antidiagonals: R(i,j) is the number of integers k that divide both i and j (i >= 1, j >= 1).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 1, 4, 1, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 2, 1, 1, 2, 2, 1, 2, 1, 1
Offset: 1

Views

Author

Clark Kimberling, Nov 08 2002

Keywords

Comments

Antidiagonal sums of R, alias row sums of T, are essentially A065608. Diagonal elements of R comprise A000203 (sums of divisors of n).
Antidiagonals of an array formed by A051731 * A051731 (transposed). - Gary W. Adamson, Nov 12 2007
If R(n) is the n X n Redheffer matrix (A143104) and Rt(n) is its transposed matrix, then this sequence seems to be formed by R(n)*Rt(n). - Enrique Pérez Herrero, Feb 21 2012

Examples

			First few rows of the array R are:
  1, 1, 1, 1, 1, 1, 1, ...
  1, 2, 1, 2, 1, 2, 1, ...
  1, 1, 2, 1, 1, 2, 1, ...
  1, 2, 1, 3, 1, 2, 1, ...
  1, 1, 1, 1, 2, 1, 1, ...
  1, 2, 2, 2, 1, 4, 1, ...
  ...
First few rows of the triangle T are:
  1;
  1, 1;
  1, 2, 1;
  1, 1, 1, 1;
  1, 2, 2, 2, 1;
  1, 1, 1, 1, 1, 1;
  1, 2, 1, 3, 1, 3, 1;
  1, 1, 2, 1, 1, 2, 1, 1;
  1, 2, 1, 2, 2, 2, 1, 2, 1;
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
  1, 2, 2, 3, 1, 4, 1, 3, 2, 2, 1;
  ...
R(4,2)=2 since 1|2, 1|4 and 2|2, 2|4.
		

Crossrefs

Programs

  • Mathematica
    T[n_,k_]:=DivisorSigma[0,GCD[n,k]]; Flatten[Table[T[n-k+1,k],{n,14},{k,n}]] (* Stefano Spezia, May 23 2021 *)

Formula

R=U*V, where U and V are the summatory matrices (A077049, A077051). The triangle T(n, k) formed by antidiagonals: T(n, k)=tau(gcd(k, n+1-k)) for 1<=k<=n, where tau(m)=A000005(m). [Corrected by Leroy Quet, Apr 08 2009]
Dirichlet g.f.: Sum_{n>=1} Sum_{k>=1} tau(gcd(n,k))/n^s/k^c = zeta(s)*zeta(c)* zeta(s + c). - Mats Granvik, May 19 2021

Extensions

Edited by N. J. A. Sloane, Jan 11 2009

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