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

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

A076014 Triangle in which m-th entry of n-th row is m^(n-1).

Original entry on oeis.org

1, 1, 2, 1, 4, 9, 1, 8, 27, 64, 1, 16, 81, 256, 625, 1, 32, 243, 1024, 3125, 7776, 1, 64, 729, 4096, 15625, 46656, 117649, 1, 128, 2187, 16384, 78125, 279936, 823543, 2097152, 1, 256, 6561, 65536, 390625, 1679616, 5764801, 16777216, 43046721
Offset: 1

Views

Author

Wolfdieter Lang, Oct 02 2002

Keywords

Comments

This becomes triangle A009998(n-1, m-1), n >= m >= 1, if the m-th column entries are divided by m^(m-1).
Row sums give A076015. The m-th column (without leading zeros) gives (m^(m-1)) powers of m, m >= 1.
T(n,m) is the number of functions f:[n-1]->[(n-1)m] such that f(x)=k*x for some positive integer k <= m. Since there exactly m choices for each of the (n-1) images under f, we obtain T(n,m) = m^(n-1). - Dennis P. Walsh, Feb 27 2013
T(n+1,m+1) = (m+1)^n is the number of partial functions from an n-element set to an m-element set, n >= m >= 0. - Mohammad K. Azarian, Jun 28 2021

Examples

			For example, T(3,2)=4 since there are exactly 4 functions f from {1,2} to {1,2,3,4} that satisfy f(x)=x or f(x)=2x. If we specify each function by the ordered pair (f(1),f(2)), the four functions are (1,2), (1,4), (2,2), and (2,4). - _Dennis P. Walsh_, Feb 27 2013
Triangle begins:
  1;
  1,   2;
  1,   4,    9;
  1,   8,   27,    64;
  1,  16,   81,   256,   625;
  1,  32,  243,  1024,  3125,   7776;
  1,  64,  729,  4096, 15625,  46656, 117649;
  1, 128, 2187, 16384, 78125, 279936, 823543, 2097152;
  ...
		

Crossrefs

Cf. A009998, A008279, A008277 (Stirling2).
Cf. A089072.

Programs

  • Maple
    seq(seq(m^(n-1),m=1..n),n=1..20); # Dennis P. Walsh, Feb 27 2013
  • Mathematica
    Table[m^(n-1),{n,10},{m,n}]//Flatten (* Harvey P. Dale, May 27 2017 *)

Formula

T(n, m) = m^(n-1), n >= m >= 1, otherwise 0.
G.f. for m-th column: (m^(m-1))(x^m)/(1-m*x), m >= 1.
a(n,m) = Sum_{p=1..m} Stirling2(n,p)*A008279(m-1, p-1), n >= m >= 1, otherwise 0.

A125120 Sum of values of repunits of length n in base b representation with 1

Original entry on oeis.org

1, 7, 41, 296, 2829, 34637, 519049, 9197344, 188039787, 4356087231, 112754069273, 3224945523736, 100999970565337, 3437517630509497, 126332966608699441, 4986057436997869696, 210331809309776028055, 9443995455881145458715
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 21 2006

Keywords

Examples

			a(4) = [1111]_2 + [1111]_3 + [1111]_4 + [1111]_5 = ((2+1)*2+1)*2+1 + ((3+1)*3+1)*3+1 + ((4+1)*4+1)*4+1 + ((5+1)*5+1)*5+1 = 296.
		

Crossrefs

Row sums of A125118.

Programs

  • Magma
    [(&+[(k^n -1)/(k-1): k in [2..n+1]]) : n in [1..30]]; // G. C. Greubel, Aug 14 2022
    
  • Mathematica
    Table[Sum[(k^n -1)/(k-1), {k, 2, n+1}], {n, 30}] (* G. C. Greubel, Aug 14 2022 *)
  • PARI
    a(n) = sum(k=1, n, sum(i=0, n-1, (k+1)^i)); \\ Michel Marcus, Dec 14 2020
    
  • SageMath
    [sum(((k+1)^n -1)/k for k in (1..n)) for n in (1..30)] # G. C. Greubel, Aug 14 2022

Formula

a(n) = Sum_{k=1..n} Sum_{i=0..n-1} (k+1)^i. [Corrected by Mathew Englander, Dec 14 2020]
a(n) = Sum_{k=1..n} A125118(n,k).
a(n+1) - a(n) = A076015(n+1) + A228275(n+2, n). - Mathew Englander, Dec 14 2020
a(n) = Sum_{j=2..n+1} (j^n - 1)/(j-1)

A284759 a(n) = (Sum_{i=1..n-1} i^(n-2)) mod n^3.

Original entry on oeis.org

0, 1, 3, 14, 100, 115, 196, 500, 189, 333, 847, 1022, 1352, 1671, 1920, 3432, 3757, 2937, 1444, 7730, 1092, 427, 4232, 8668, 15000, 13037, 19197, 20902, 1682, 17999, 16337, 27856, 32043, 31873, 16170, 14298, 47915, 5603, 12792, 8260, 16810, 18949, 51772, 64526
Offset: 1

Views

Author

Felix Fröhlich, Apr 02 2017

Keywords

Comments

Conjecture: For n > 1, a(n) = 0 if and only if n is a term of A088164, i.e., n is a Wolstenholme prime (cf. Mestrovic, 2012, Conjecture 2.10).

Crossrefs

Programs

  • Maple
    seq(add(i^(n-2),i=1..n-1) mod n^3, n=1..100);
  • Mathematica
    Table[Mod[Sum[i^(n - 2), {i, n - 1}], n^3], {n, 44}] (* Michael De Vlieger, Apr 02 2017 *)
  • PARI
    a(n) = lift(Mod(sum(i=1, n-1, i^(n-2)), n^3))
    
  • PARI
    a(n)=my(m=n^3,e=n-2); lift(sum(i=1,n-1, Mod(i,m)^e)) \\ Charles R Greathouse IV, Apr 07 2017

Formula

a(n) = A076015(n-1) modulo A000578(n).

A284760 a(n) = Sum_{i=1..n-1}(i^(n-2)) mod n^4.

Original entry on oeis.org

0, 1, 3, 14, 100, 979, 196, 500, 3834, 1333, 2178, 1022, 16731, 12647, 42420, 23912, 23409, 26265, 15162, 79730, 84441, 21723, 28566, 160732, 280625, 329405, 137295, 569702, 74849, 71999, 463202, 715984, 247665, 31873, 1302420, 574170, 807710, 225091, 1377129
Offset: 1

Views

Author

Felix Fröhlich, Apr 02 2017

Keywords

Comments

Mestrovic conjectures that a(n) > 0 for all n > 1 (Conjecture 2.11).

Examples

			For n=5 the sum is 1^3 + 2^3 + 3^3 + 4^3 = 1 + 8 + 27 + 64 = 100; the modulus is 5^4 = 625. So a(5) = 100 mod 625 = 100. - _Peter Munn_, May 01 2017
		

Crossrefs

Programs

  • Mathematica
    Table[Mod[Sum[i^(n - 2), {i, n - 1}], n^4], {n, 39}] (* Michael De Vlieger, Apr 05 2017 *)
  • PARI
    a(n) = lift(Mod(sum(i=1, n-1, i^(n-2)), n^4))
    
  • PARI
    a(n)=my(m=n^4,e=n-2); lift(sum(i=1,n-1, Mod(i,m)^e)) \\ Charles R Greathouse IV, Apr 07 2017

Formula

a(n) = A076015(n-1) modulo n^4.

A345106 a(n) = Sum_{k=1..n} k^(n - floor(n/k)).

Original entry on oeis.org

1, 3, 14, 96, 971, 12015, 184286, 3283598, 67676125, 1572527901, 40843114146, 1170338862814, 36718016941445, 1251213685475261, 46033362584427670, 1818364700307111794, 76762441669319061911, 3448793841153099408185, 164309637864524321789042
Offset: 1

Views

Author

Seiichi Manyama, Jun 08 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[k^(n - Floor[n/k]), {k, 1, n}]; Array[a, 20] (* Amiram Eldar, Jun 08 2021 *)
  • PARI
    a(n) = sum(k=1, n, k^(n-n\k));
    
  • PARI
    my(N=20, x='x+O('x^N)); Vec(sum(k=1, N, k^(k-1)*x^k*(1-(k*x)^k)/((1-k^(k-1)*x^k)*(1-k*x))))

Formula

G.f.: Sum_{k>=1} k^(k-1)*x^k * (1 - (k*x)^k)/((1 - k^(k-1)*x^k) * (1 - k*x)).

A360172 Sequences of length n in [n] not starting with their minimum value.

Original entry on oeis.org

0, 1, 13, 156, 2146, 34455, 638723, 13479760, 319689156, 8425695015, 244459904085, 7745416087332, 266155064108662, 9860698167427471, 391859875043125895
Offset: 1

Views

Author

Olivier Gérard, Jan 28 2023

Keywords

Comments

Other simple classes of endofunctions are counted by this sequence.

Examples

			The 13 sequences not starting with their minimum value for n=3 are
  211, 212, 213, 221, 231, 311, 312, 313, 321, 331, 322, 323, 332.
		

Crossrefs

A076015(n) + A360172(n) = A000312(n).

Programs

  • Mathematica
    Table[n^n - Plus @@ Table[i^(n - 1), {i, 1, n}], {n, 1, 15}]

A120490 1 + Sum[ k^(n-1), {k,1,n}].

Original entry on oeis.org

2, 4, 15, 101, 980, 12202, 184821, 3297457, 67731334, 1574304986, 40851766527, 1170684360925, 36720042483592, 1251308658130546, 46034015337733481, 1818399978159990977, 76762718946972480010, 3448810852242967123282
Offset: 1

Views

Author

Alexander Adamchuk, Aug 04 2006

Keywords

Comments

Prime p divides a(p). Prime p divides a(p-2) for p>3. p^2 divides a(p-2) for prime p=7. p^2 divides a(p^2-2) for prime p except p=3. p^3 divides a(p^2-2) for prime p=7. p^3 divides a(p^3-2) for prime p>3. p^4 divides a(p^3-2) for prime p=7. p^4 divides a(p^4-2) for prime p>3. p^5 divides a(p^3-2) for prime p=7. It appears that p^k divides a(p^k-2) for prime p>3 and 7^(k+1) divides a(7^k-2) for integer k>0.

Crossrefs

Cf. A076015.

Programs

  • Mathematica
    Table[(1+Sum[k^(n-1),{k,1,n}]),{n,1,23}]

Formula

a(n) = 1 + Sum[ k^(n-1), {k,1,n}]. a(n) = 1 + A076015[n].
Showing 1-8 of 8 results.