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.

A290125 Square array read by antidiagonals T(n,k) = sigma(k + n) - sigma(k) - n, with n>=0 and k>=1.

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 0, 2, 2, 3, 0, -2, 0, 0, 1, 0, 5, 3, 5, 5, 6, 0, -5, 0, -2, 0, 0, 1, 0, 6, 1, 6, 4, 6, 6, 7, 0, -3, 3, -2, 3, 1, 3, 3, 4, 0, 4, 1, 7, 2, 7, 5, 7, 7, 8, 0, -7, -3, -6, 0, -5, 0, -2, 0, 0, 1, 0, 15, 8, 12, 9, 15, 10, 15, 13, 15, 15, 16
Offset: 0

Views

Author

Michel Marcus, Jul 20 2017

Keywords

Comments

A015886(n) gives the position of the first zero in the n-th row of this array.

Examples

			Array begins:
  0, 0, 0,  0,  0,  0,  0, ...
  1, 0, 2, -2,  5, -5,  6, ...
  1, 2, 0,  3,  0,  1,  3, ...
  3, 0, 5, -2,  6, -2,  7, ...
  1, 5, 0,  4,  3,  2,  0, ...
  6, 0, 6,  1,  7, -5, 15, ...
  1, 6, 3,  5,  0, 10,  0, ...
  7, 3, 7, -2, 15, -5,  9, ...
  ...
		

Crossrefs

Cf. A000203 (sigma), A015886.

Programs

  • Mathematica
    Table[Function[n, If[k + n == 0, 0, DivisorSigma[1, k + n]] - If[k == 0, 0, DivisorSigma[1, k]] - n][m - k], {m, 12}, {k, m, 1, -1}] // Flatten (* Michael De Vlieger, Jul 20 2017 *)
  • PARI
    T(n,k) = sigma(k + n) - sigma(k) - n;
    
  • PARI
    a(n) = n++; my(s = ceil((-1+sqrt(1+8*n))/2));r=n-binomial(s,2)-1;k=s-r;T(r,k) \\ David A. Corneth, Jul 20 2017
    
  • Python
    from sympy import divisor_sigma
    l=[]
    def T(n, k):
        return 0 if n==0 or k==0 else divisor_sigma(k + n) - divisor_sigma(k) - n
    for n in range(11): l+=[T(k, n - k + 1) for k in range(n + 1)]
    print(l) # Indranil Ghosh, Jul 21 2017

Formula

T(0, k) = 0 for all k.