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.

A103438 Square array T(m,n) read by antidiagonals: Sum_{k=1..n} k^m.

Original entry on oeis.org

0, 0, 1, 0, 1, 2, 0, 1, 3, 3, 0, 1, 5, 6, 4, 0, 1, 9, 14, 10, 5, 0, 1, 17, 36, 30, 15, 6, 0, 1, 33, 98, 100, 55, 21, 7, 0, 1, 65, 276, 354, 225, 91, 28, 8, 0, 1, 129, 794, 1300, 979, 441, 140, 36, 9, 0, 1, 257, 2316, 4890, 4425, 2275, 784, 204, 45, 10
Offset: 0

Views

Author

Ralf Stephan, Feb 11 2005

Keywords

Comments

For the o.g.f.s of the column sequences for this array, see A196837 and the link given there. - Wolfdieter Lang, Oct 15 2011
T(m,n)/n is the m-th moment of the discrete uniform distribution on {1,2,...,n}. - Geoffrey Critzer, Dec 31 2018
T(1,n) divides T(m,n) for odd m. - Franz Vrabec, Dec 23 2020

Examples

			Square array begins:
  0, 1,  2,   3,    4,     5,     6,      7,      8,      9, ... A001477;
  0, 1,  3,   6,   10,    15,    21,     28,     36,     45, ... A000217;
  0, 1,  5,  14,   30,    55,    91,    140,    204,    285, ... A000330;
  0, 1,  9,  36,  100,   225,   441,    784,   1296,   2025, ... A000537;
  0, 1, 17,  98,  354,   979,  2275,   4676,   8772,  15333, ... A000538;
  0, 1, 33, 276, 1300,  4425, 12201,  29008,  61776, 120825, ... A000539;
  0, 1, 65, 794, 4890, 20515, 67171, 184820, 446964, 978405, ... A000540;
Antidiagonal triangle begins as:
  0;
  0, 1;
  0, 1,  2;
  0, 1,  3,  3;
  0, 1,  5,  6,  4;
  0, 1,  9, 14, 10,  5;
  0, 1, 17, 36, 30, 15, 6;
		

References

  • J. Faulhaber, Academia Algebrae, Darinnen die miraculosische inventiones zu den höchsten Cossen weiters continuirt und profitirt werden, Augspurg, bey Johann Ulrich Schönigs, 1631.

Crossrefs

Diagonals include A076015 and A031971.
Antidiagonal sums are in A103439.
Antidiagonals are the rows of triangle A192001.

Programs

  • Magma
    T:= func< n,k | n eq 0 select k else (&+[j^n: j in [0..k]]) >;
    [T(n-k,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Dec 22 2021
    
  • Maple
    seq(print(seq(Zeta(0,-k,1)-Zeta(0,-k,n+1),n=0..9)),k=0..6);
    # (Produces the square array from the example.) Peter Luschny, Nov 16 2008
    # alternative
    A103438 := proc(m,n)
        (bernoulli(m+1,n+1)-bernoulli(m+1))/(m+1) ;
        if m = 0 then
            %-1 ;
        else
            % ;
        end if;
    end proc: # R. J. Mathar, May 10 2013
    # simpler:
    A103438 := proc(m,n)
        (bernoulli(m+1,n+1)-bernoulli(m+1,1))/(m+1) ;
    end proc: # Peter Luschny, Mar 20 2024
  • Mathematica
    T[m_, n_]:= HarmonicNumber[m, -n]; Flatten[Table[T[m-n, n], {m, 0, 11}, {n, m, 0, -1}]] (* Jean-François Alcover, May 11 2012 *)
  • PARI
    T(m,n)=sum(k=0,n,k^m)
    
  • Python
    from itertools import count, islice
    from math import comb
    from fractions import Fraction
    from sympy import bernoulli
    def A103438_T(m,n): return sum(k**m for k in range(1,n+1)) if n<=m else int(sum(comb(m+1,i)*(bernoulli(i) if i!=1 else Fraction(1,2))*n**(m-i+1) for i in range(m+1))/(m+1))
    def A103438_gen(): # generator of terms
        for m in count(0):
            for n in range(m+1):
                yield A103438_T(m-n,n)
    A103438_list = list(islice(A103438_gen(),100)) # Chai Wah Wu, Oct 23 2024
  • SageMath
    def T(n,k): return (bernoulli_polynomial(k+1, n+1) - bernoulli_polynomial(1, n+1)) /(n+1)
    flatten([[T(n-k,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Dec 22 2021
    

Formula

E.g.f.: e^x*(e^(x*y)-1)/(e^x-1).
T(m, n) = Zeta(-n, 1) - Zeta(-n, m + 1), for m >= 0 and n >= 0, where Zeta(z, v) is the Hurwitz zeta function. - Peter Luschny, Nov 16 2008
T(m, n) = HarmonicNumber(m, -n). - Jean-François Alcover, May 11 2012
T(m, n) = (Bernoulli(m + 1, n + 1) - Bernoulli(m + 1, 1)) / (m + 1). - Peter Luschny, Mar 20 2024
T(m, n) = Sum_{k=0...m-n} B(k)*(-1)^k*binomial(m-n,k)*n^(m-n-k+1)/(m-n-k+1), where B(k) = Bernoulli number A027641(k) / A027642(k). - Robert B Fowler, Aug 20 2024
T(m, n) = Sum_{i=1..n} J_m(i)*floor(n/i), where J_m is the m-th Jordan totient function. - Ridouane Oudra, Jul 19 2025