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

A228617 T(n,k) is the number of s in {1,...,n}^n having shortest run with the same value of length k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 2, 2, 0, 24, 0, 3, 0, 240, 12, 0, 4, 0, 3080, 40, 0, 0, 5, 0, 46410, 210, 30, 0, 0, 6, 0, 822612, 840, 84, 0, 0, 0, 7, 0, 16771832, 5208, 112, 56, 0, 0, 0, 8, 0, 387395856, 23760, 720, 144, 0, 0, 0, 0, 9, 0, 9999848700, 148410, 2610, 180, 90, 0, 0, 0, 0, 10
Offset: 0

Views

Author

Alois P. Heinz, Aug 27 2013

Keywords

Comments

Sum_{k=0..n} k*T(n,k) = A228618(n).
Sum_{k=0..n} T(n,k) = A000312(n).
T(2*n,n) = A002939(n) for n>0.
T(2*n+1,n) = A033586(n) for n>1.
T(2*n+2,n) = A085250(n+1) for n>2.
T(2*n+3,n) = A033586(n+1) for n>3.

Examples

			T(3,1) = 24: [1,1,2], [1,1,3], [1,2,1], [1,2,2], [1,2,3], [1,3,1], [1,3,2], [1,3,3], [2,1,1], [2,1,2], [2,1,3], [2,2,1], [2,2,3], [2,3,1], [2,3,2], [2,3,3], [3,1,1], [3,1,2], [3,1,3], [3,2,1], [3,2,2], [3,2,3], [3,3,1], [3,3,2].
T(3,3) =  3: [1,1,1], [2,2,2], [3,3,3].
Triangle T(n,k) begins:
  1;
  0,        1;
  0,        2,    2;
  0,       24,    0,   3;
  0,      240,   12,   0,  4;
  0,     3080,   40,   0,  0,  5;
  0,    46410,  210,  30,  0,  0,  6;
  0,   822612,  840,  84,  0,  0,  0,  7;
  0, 16771832, 5208, 112, 56,  0,  0,  0,  8;
		

Crossrefs

Row sums give: A000312.
Main diagonal gives: A028310.

A085537 a(n) = n^4 - n^3.

Original entry on oeis.org

0, 0, 8, 54, 192, 500, 1080, 2058, 3584, 5832, 9000, 13310, 19008, 26364, 35672, 47250, 61440, 78608, 99144, 123462, 152000, 185220, 223608, 267674, 317952, 375000, 439400, 511758, 592704, 682892, 783000, 893730, 1015808, 1149984, 1297032, 1457750, 1632960
Offset: 0

Views

Author

N. J. A. Sloane, Jul 05 2003

Keywords

Comments

For n>=1, a(n) is equal to the number of functions f:{1,2,3,4}->{1,2,...,n} such that for a fixed x in {1,2,3,4} and a fixed y in {1,2,...,n} we have f(x)<>y. - Aleksandar M. Janjic and Milan Janjic, Mar 13 2007
Let K_n denote the complete graph on n (n>1) vertices. The sequence corresponds to the Wiener index of K_n X K_n (Cartesian product of K_n with itself). - K.V.Iyer, Mar 12 2009
Lewis proved that the order of a solvable nonabelian finite group |G| is less than or equal to e^4 - e^3, where when d is an irreducible character degree of G, then there is a positive integer e such that |G| = d(d+e). - Jonathan Vos Post, Jun 21 2012

Crossrefs

A diagonal of A228273.
Cf. A085540 (same sequence with initial 0 dropped).

Programs

  • Mathematica
    Table[(n - 1) n^3, {n, 0, 20}] (* Eric W. Weisstein, Sep 08 2017 *)
    LinearRecurrence[{5, -10, 10, -5, 1}, {0, 8, 54, 192, 500}, {0, 20}] (* Eric W. Weisstein, Sep 08 2017 *)
    CoefficientList[Series[2 x^2 (4 + 7 x + x^2)/(1 - x)^5, {x, 0, 20}], x] (* Eric W. Weisstein, Sep 08 2017 *)
  • PARI
    A085537(n) = n^4-n^3

Formula

From R. J. Mathar, Sep 12 2008: (Start)
a(n) = A085540(n-1).
G.f.: 2*x^2*(4 + 7*x + x^2)/(1-x)^5. (End)
a(n) = A000583(n) - A000578(n). - Omar E. Pol, Jun 23 2012
Sum_{n>=2} 1/a(n) = 3 - zeta(2) - zeta(3) = A152419. - Daniel Suteu, Feb 06 2017
a(n) = 2*A092364(n+1). - Bruno Berselli, Sep 08 2017
Sum_{n>=2} (-1)^n/a(n) = Pi^2/12 + 2*log(2) + 3*zeta(3)/4 - 3. - Amiram Eldar, Jul 05 2020
E.g.f.: exp(x)*x^2*(4 + 5*x + x^2). - Stefano Spezia, Jul 06 2021
Product_{n>=2} (1 - 1/a(n)) = A146489. - Amiram Eldar, Nov 22 2022

A031972 a(n) = Sum_{k=1..n} n^k.

Original entry on oeis.org

0, 1, 6, 39, 340, 3905, 55986, 960799, 19173960, 435848049, 11111111110, 313842837671, 9726655034460, 328114698808273, 11966776581370170, 469172025408063615, 19676527011956855056, 878942778254232811937, 41660902667961039785742, 2088331858752553232964199
Offset: 0

Views

Author

N. J. A. Sloane, Dec 11 1999

Keywords

Comments

Sum of lengths of longest ending contiguous subsequences with the same value over all s in {1,...,n}^n: a(n) = Sum_{k=1..n} k*A228273(n,k). a(2) = 6 = 2+1+1+2: [1,1], [1,2], [2,1], [2,2]. - Alois P. Heinz, Aug 19 2013
a(n) is the expected wait time to see the contiguous subword 11...1 (n copies of 1) over all infinite sequences on alphabet {1,2,...,n}. - Geoffrey Critzer, May 19 2014
a(n) is the number of sequences of k elements from {1,2,...,n}, where 1<=k<=n. For example, a(2) = 6, counting the sequences, [1], [2], [1,1], [1,2], [2,1], [2,2]. Equivalently, a(n) is the number of bar graphs having a height and width of at most n. - Emeric Deutsch, Jan 24 2017.
In base n, a(n) has n+1 digits: n 1's followed by a 0. - Mathew Englander, Oct 20 2020

Crossrefs

Main diagonal of A228275.

Programs

Formula

a(1)=1; for n!=1 a(n) = (n^(n+1)-1)/(n-1) - 1. - Benoit Cloitre, Aug 17 2002
a(n) = A031973(n)-1 for n>0. - Robert G. Wilson v, Apr 15 2015
a(n) = n*A023037(n) = n^n - 1 + A023037(n). - Mathew Englander, Oct 20 2020

Extensions

a(0)=0 prepended by Alois P. Heinz, Oct 22 2019

A085538 a(n) = n^5 - n^4.

Original entry on oeis.org

0, 0, 16, 162, 768, 2500, 6480, 14406, 28672, 52488, 90000, 146410, 228096, 342732, 499408, 708750, 983040, 1336336, 1784592, 2345778, 3040000, 3889620, 4919376, 6156502, 7630848, 9375000, 11424400, 13817466, 16595712, 19803868, 23490000, 27705630, 32505856
Offset: 0

Views

Author

N. J. A. Sloane, Jul 05 2003

Keywords

Comments

For n >= 1, a(n) is equal to the number of functions f:{1,2,3,4,5}->{1,2,...,n} such that for a fixed x in {1,2,3,4,5} and a fixed y in {1,2,...,n} we have f(x) <> y. - Aleksandar M. Janjic and Milan Janjic, Mar 13 2007

Crossrefs

A diagonal of A228273.

Programs

Formula

G.f.: 2*x^2*(x^3 + 18*x^2 + 33*x + 8)/(x-1)^6. - Colin Barker, Nov 06 2012
Sum_{n>=2} 1/a(n) = 4 - zeta(2) - zeta(3) - zeta(4). - Amiram Eldar, Jul 05 2020
Product_{n>=2} (1 - 1/a(n)) = A146492. - Amiram Eldar, Nov 22 2022

A085539 a(n) = n^6 - n^5.

Original entry on oeis.org

0, 0, 32, 486, 3072, 12500, 38880, 100842, 229376, 472392, 900000, 1610510, 2737152, 4455516, 6991712, 10631250, 15728640, 22717712, 32122656, 44569782, 60800000, 81682020, 108226272, 141599546, 183140352, 234375000, 297034400, 373071582, 464679936
Offset: 0

Views

Author

N. J. A. Sloane, Jul 05 2003

Keywords

Comments

For n>=1, a(n) is equal to the number of functions f:{1,2,3,4,5,6}->{1,2,...,n} such that for a fixed x in {1,2,3,4,5,6} and a fixed y in {1,2,...,n} we have f(x)<>y. - Aleksandar M. Janjic and Milan Janjic, Mar 13 2007

Crossrefs

A diagonal of A228273.

Programs

Formula

G.f.: -2*x^2*(x^4+41*x^3+171*x^2+131*x+16)/(x-1)^7. - Colin Barker, Nov 06 2012
Sum_{n>=2} 1/a(n) = 5 - Sum_{k=2..5} zeta(k). - Amiram Eldar, Jul 05 2020

A228154 T(n,k) is the number of s in {1,...,n}^n having longest contiguous subsequence with the same value of length k; triangle T(n,k), n>=1, 1<=k<=n, read by rows.

Original entry on oeis.org

1, 2, 2, 12, 12, 3, 108, 120, 24, 4, 1280, 1520, 280, 40, 5, 18750, 23400, 3930, 510, 60, 6, 326592, 423360, 65016, 7644, 840, 84, 7, 6588344, 8800008, 1241464, 132552, 13440, 1288, 112, 8, 150994944, 206622720, 26911296, 2622528, 244944, 22032, 1872, 144, 9
Offset: 1

Views

Author

Walt Rorie-Baety, Aug 15 2013

Keywords

Examples

			T(1,1) =  1: [1].
T(2,1) =  2: [1,2], [2,1].
T(2,2) =  2: [1,1], [2,2].
T(3,1) = 12: [1,2,1], [1,2,3], [1,3,1], [1,3,2], [2,1,2], [2,1,3], [2,3,1], [2,3,2], [3,1,2], [3,1,3], [3,2,1], [3,2,3].
T(3,2) = 12: [1,1,2], [1,1,3], [1,2,2], [1,3,3], [2,1,1], [2,2,1], [2,2,3], [2,3,3], [3,1,1], [3,2,2], [3,3,1], [3,3,2].
T(3,3) =  3: [1,1,1], [2,2,2], [3,3,3].
Triangle T(n,k) begins:
.       1;
.       2,       2;
.      12,      12,       3;
.     108,     120,      24,      4;
.    1280,    1520,     280,     40,     5;
.   18750,   23400,    3930,    510,    60,    6;
.  326592,  423360,   65016,   7644,   840,   84,   7;
. 6588344, 8800008, 1241464, 132552, 13440, 1288, 112,  8;
		

Crossrefs

Row sums give: A000312.
Column k=1 gives: A055897.
Main diagonal gives: A000027.
Lower diagonal gives: 2*A180291.

Programs

  • Maple
    T:= proc(n) option remember; local b; b:=
          proc(m, s, i) option remember; `if`(m>i or s>m, 0,
            `if`(i=1, n, `if`(s=1, (n-1)*add(b(m, h, i-1), h=1..m),
             b(m, s-1, i-1) +`if`(s=m, b(m-1, s-1, i-1), 0))))
          end; forget(b);
          seq(add(b(k, s, n), s=1..k), k=1..n)
        end:
    seq(T(n), n=1..12);  # Alois P. Heinz, Aug 18 2013
  • Mathematica
    T[n_] := T[n] = Module[{b}, b[m_, s_, i_] := b[m, s, i] = If[m>i || s>m, 0, If[i == 1, n, If[s == 1, (n-1)*Sum[b[m, h, i-1], {h, 1, m}], b[m, s-1, i-1] + If[s == m, b[m-1, s-1, i-1], 0]]]]; Table[Sum[b[k, s, n], {s, 1, k}], {k, 1, n}]]; Table[ T[n], {n, 1, 12}] // Flatten (* Jean-François Alcover, Mar 06 2015, after Alois P. Heinz *)

Formula

Sum_{k=1..n} k * T(n,k) = A228194(n). - Alois P. Heinz, Dec 23 2020
Showing 1-6 of 6 results.