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

A113704 Triangle read by rows. The indicator function for divisibility.

Original entry on oeis.org

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

Views

Author

Paul Barry, Nov 05 2005

Keywords

Comments

From Peter Luschny, Jul 01 2023: (Start)
Definition: d divides n <=> n = m*d for some m.
Equivalently, d divides n iff d = n or d > 0, and the integer remainder of n divided by d is 0.
This definition is sufficient to define the infinite lower triangular array, i.e., if we consider only the range 0 <= d <= n. But see the construction of the inverse square array in A363914, which has to make this restriction explicit because with the above definition every integer divides 0, and thus the first row of the square matrix becomes 1 for all d.
(End)

Examples

			Triangle begins
  1;
  0, 1;
  0, 1, 1;
  0, 1, 0, 1;
  0, 1, 1, 0, 1;
  0, 1, 0, 0, 0, 1;
  0, 1, 1, 1, 0, 0, 1;
  0, 1, 0, 0, 0, 0, 0, 1;
		

References

  • Tom M. Apostol, Introduction to Analytic Number Theory, Springer 1976, p. 14.

Crossrefs

Cf. A051731, A113705 (reversed rows concatenated).
Cf. A000005 (row sums), A000007, A000961, A007947, A057427, A126988, A363914 (inverse triangle).

Programs

  • Maple
    divides := (k, n) -> ifelse(k = n or (k > 0 and irem(n, k) = 0), 1, 0):
    A113704_row := n -> local k; seq(divides(k, n), k = 0..n):
    seq(print(A113704_row(n)), n = 0..9);  # Peter Luschny, Jun 28 2023
  • Mathematica
    Table[If[k==0,Boole[n==0],Boole[Divisible[n,k]]],{n,0,10},{k,0,n}] (* Gus Wiseman, Mar 06 2020 *)
  • SageMath
    def A113704_row(n): return [int(k.divides(n)) for k in (0..n)]
    for n in (0..9): print(A113704_row(n))  # Peter Luschny, Jun 28 2023
    
  • SageMath
    dim = 10
    matrix(ZZ, dim, dim, lambda n, d: d <= n and ZZ(d).divides(ZZ(n)))  # Peter Luschny, Jul 01 2023

Formula

Column k has g.f. 1/(1-x^k), k >= 1. Column 0 has g.f. 1.
T(n, d) = 1 if d > 0 and d|n, otherwise 0^n. - Gus Wiseman, Mar 06 2020

Extensions

Name edited by Peter Luschny, Jul 29 2023

A055895 Inverse Moebius transform of powers of 2.

Original entry on oeis.org

1, 2, 6, 10, 22, 34, 78, 130, 278, 522, 1062, 2050, 4190, 8194, 16518, 32810, 65814, 131074, 262734, 524290, 1049654, 2097290, 4196358, 8388610, 16781662, 33554466, 67117062, 134218250, 268451990, 536870914, 1073775726, 2147483650, 4295033110, 8589936650
Offset: 0

Views

Author

Christian G. Bower, Jun 09 2000

Keywords

Comments

Row sums of A055894.

Examples

			G.f. = 1 + 2*x + 6*x^2 + 10*x^3 + 22*x^4 + 34*x^5 + 78*x^6 + 130*x^7 + ...
		

Crossrefs

Cf. A034729, A113705 (binary), A339916.
Cf. A055894.

Programs

  • Mathematica
    Table[Plus @@ Map[Function[d, 2^d], Divisors[n]], {n, 0, 30}] (* Olivier Gérard, Jan 01 2012 *)
    a[0]=1; a[n_] := DivisorSum[n, 2^#&]; Array[a, 40, 0] (* Jean-François Alcover, Dec 01 2015 *)
  • PARI
    a(n)=if(n<1,1,polcoeff(sum(k=1,n,1/(1-2*x^k),x*O(x^n)),n))
    
  • PARI
    a(n)=if(n<1,1,sumdiv(n,d,2^d)); /* Joerg Arndt, Aug 14 2012 */

Formula

G.f.: 1 + Sum_{k>=1} 2^k*x^k/(1-x^k). - Benoit Cloitre, Apr 21 2003
a(n) = Sum_{d divides n} 2^d. - Olivier Gérard, Jan 01 2012
a(n) = 2 * A034729(n) for n >= 1. - Joerg Arndt, Aug 14 2012
G.f.: 1 + Sum_{k>=1} 2*x^k/(1-2*x^k). - Joerg Arndt, Mar 28 2013

A363733 Array read by upwards antidiagonals. The family of polynomials generated by the divisibility matrix (A113704) evaluated over the nonnegative integers.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 2, 2, 1, 0, 2, 6, 3, 1, 0, 3, 10, 12, 4, 1, 0, 2, 22, 30, 20, 5, 1, 0, 4, 34, 93, 68, 30, 6, 1, 0, 2, 78, 246, 276, 130, 42, 7, 1, 0, 4, 130, 768, 1028, 655, 222, 56, 8, 1, 0, 3, 278, 2190, 4180, 3130, 1338, 350, 72, 9, 1
Offset: 0

Views

Author

Peter Luschny, Jun 27 2023

Keywords

Comments

The name expresses the 'row view' of the array. The 'column view' regards the array as the collection of the inverse Möbius transforms of the power sequences k^n = 0^n, 1^n, 2^n, .... (n >= 0). Viewed this way, the array is a generalization of the number of divisors sequence tau (A000005), to which it reduces in the case k = 1.
The array has offset (0, 0). It uses the usual definition of 'k divides n' as described in Apostol, rather than the shortened version, which restricts to values k > 0 as some programs do (but not SageMath). Such a restriction makes sense in the context of rational numbers but not in the case of natural numbers.

Examples

			Array A(n, k) starts:
  [0] 1, 1,   1,    1,     1,      1,       1,       1,        1, ... A000012
  [1] 0, 1,   2,    3,     4,      5,       6,       7,        8, ... A001477
  [2] 0, 2,   6,   12,    20,     30,      42,      56,       72, ... A002378
  [3] 0, 2,  10,   30,    68,    130,     222,     350,      520, ... A034262
  [4] 0, 3,  22,   93,   276,    655,    1338,    2457,     4168, ...
  [5] 0, 2,  34,  246,  1028,   3130,    7782,   16814,    32776, ... A131471
  [6] 0, 4,  78,  768,  4180,  15780,   46914,  118048,   262728, ...
  [7] 0, 2, 130, 2190, 16388,  78130,  279942,  823550,  2097160, ... A190578
  [8] 0, 4, 278, 6654, 65812, 391280, 1680954, 5767258, 16781384, ...
   A000005,A055895,A363913, ...                             A066108 (diagonal)
.
Triangle T(n, k) starts:
  [0] 1;
  [1] 0, 1;
  [2] 0, 1,   1;
  [3] 0, 2,   2,   1;
  [4] 0, 2,   6,   3,    1;
  [5] 0, 3,  10,  12,    4,   1;
  [6] 0, 2,  22,  30,   20,   5,   1;
  [7] 0, 4,  34,  93,   68,  30,   6,  1;
  [8] 0, 2,  78, 246,  276, 130,  42,  7, 1;
  [9] 0, 4, 130, 768, 1028, 655, 222, 56, 8, 1;
		

References

  • Tom M. Apostol, Introduction to Analytic Number Theory, Springer 1976, p. 14.

Crossrefs

Cf. A113704 (in compact form A113705), A000005 (column 1), A055895 (column 2), A363913 (column 3), A001477 (row 1), A002378 (row 2), A034262 (row 3), A131471 (row 5), A190578 (row 7), A363912 (row sums), A066108 (main diagonal of array).

Programs

  • Maple
    divides := (k, n) -> ifelse(k = n or (k > 0 and irem(n, k) = 0), 1, 0):
    A := (n, k) -> local j; add(divides(j, n) * k^j, j = 0 ..n):
    for n from 0 to 8 do seq(A(n, k), k = 0..8) od;
    # If we introduce the 'inverse Möbius transform' InvMoebius acting on s ...
    InvMoebius := (s, n) -> local j; add(divides(j, n) * s(j), j = 0 ..n):
    # ... the transposed array is given by applying InvMoebius to the powers r^m:
    seq(lprint(seq(InvMoebius(m -> r^m, n), n = 0..8)), r = 0..8);
    # For instance we see that the number of divisors is the inverse
    # Moebius transform of the constant sequence s = 1.
  • SageMath
    def A(n, k): return sum(j.divides(n) * k^j for j in (0..n))
    for n in srange(9): print([A(n, k) for k in (0..8)])

Formula

A(n, k) = Sum_{j=0..n} divides(j, n) * k^j, where divides(k, n) <-> [k = n or (k > 0 and n mod k = 0)], and '[ ]' denotes the Iverson bracket.
The columns are the inverse Möbius transforms of the powers x^n, x >= 0.
Showing 1-3 of 3 results.