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.

Previous Showing 31-38 of 38 results.

A198400 a(n) = 10^n - 10*n.

Original entry on oeis.org

1, 0, 80, 970, 9960, 99950, 999940, 9999930, 99999920, 999999910, 9999999900, 99999999890, 999999999880, 9999999999870, 99999999999860, 999999999999850, 9999999999999840, 99999999999999830, 999999999999999820, 9999999999999999810, 99999999999999999800, 999999999999999999790
Offset: 0

Views

Author

Vincenzo Librandi, Oct 26 2011

Keywords

Crossrefs

Programs

  • Magma
    [10^n-10*n: n in [0..25]];
    
  • Mathematica
    CoefficientList[Series[(1-12*x+101*x^2)/((1-10*x)*(1-x)^2),{x,0,40}],x] (* Vincenzo Librandi, Jul 06 2012 *)
  • PARI
    a(n)=10^n-10*n \\ Charles R Greathouse IV, Jul 06 2017

Formula

a(n) = 12*a(n-1) - 21*a(n-2) + 10*a(n-3) for n > 2.
G.f.: (1-12*x+101*x^2)/((1-10*x)*(1-x)^2). - Vincenzo Librandi, Jul 06 2012
E.g.f.: exp(x)*(exp(9*x) - 10*x). - Elmo R. Oliveira, Aug 29 2024

A189711 Number of non-monotonic functions from [k] to [n-k].

Original entry on oeis.org

2, 10, 8, 28, 54, 22, 60, 190, 204, 52, 110, 490, 916, 676, 114, 182, 1050, 2878, 3932, 2118, 240, 280, 1988, 7278, 15210, 16148, 6474, 494, 408, 3444, 15890, 45738, 77470, 65210, 19576, 1004, 570, 5580, 31192, 115808, 278358, 389640, 261708, 58920, 2026, 770, 8580, 56484, 258720, 820118, 1677048, 1951700, 1048008, 176994, 4072, 1012, 12650, 96006, 525444, 2090296, 5758802, 10073698, 9763628, 4193580, 531262, 8166
Offset: 5

Views

Author

Dennis P. Walsh, Apr 25 2011

Keywords

Comments

Triangle T(n,k), 3<=k<=n-2, given by (n-k)^k-2*C(n-1,k)+(n-k) is derived using inclusion/exclusion. The triangle contains several other listed sequences: T(2n,n) is sequence A056174(n), number of monotonic functions from [n] to [n]; T(n+2,n) is sequence A005803(n), second-order Eulerian numbers; and T(n,3) is A006331(n-4), maximum accumulated number of electrons at energy level n.

Examples

			Triangle T(n,k) begins
  n\k    3     4     5     6     7     8     9
   5     2
   6    10     8
   7    28    54    22
   8    60   190   204    52
   9   110   490   916   676   114
  10   182  1050  2878  3932  2118   240
  11   280  1988  7278 15210 16148  6474   494
  ...
For n=6 and k=4, T(6,4)=8 since there are 8 non-monotonic functions f from [4] to [2], namely, f = <f(1),f(2),f(3),f(4)> given by <1,1,2,1>, <1,2,1,1>, <1,2,2,1>, <1,2,1,2>, <2,2,1,2>, <2,1,2,2>, <2,1,1,2>, and <2,1,2,1>.
		

Crossrefs

Cf. A007318.

Programs

  • Haskell
    a189711 n k = (n - k) ^ k - 2 * a007318 (n - 1) k + n - k
    a189711_row n = map (a189711 n) [3..n-2]
    a189711_tabl = map a189711_row [5..]
    -- Reinhard Zumkeller, May 16 2014
  • Maple
    seq(seq((n-k)^k-2*binomial(n-1,k)+(n-k),k=3..(n-2)),n=5..15);
  • Mathematica
    nmax = 15; t[n_, k_] := (n-k)^k-2*Binomial[n-1, k]+(n-k); Flatten[ Table[ t[n, k], {n, 5, nmax}, {k, 3, n-2}]](* Jean-François Alcover, Nov 18 2011, after Maple *)

Formula

T(n,k)=(n-k)^k-2*C(n-1,k)+(n-k).
T(n,3) = A006331(n-4) for n>=5.
T(n+2,n) = A005803(n) for n>=3.
T(2n,n) = A056174(n) for n>=3.

A192020 Triangle read by rows: T(n,k) is the number of unordered pairs of nodes at distance k in the binomial tree of order n (1 <= k <= 2n-1; entries in row n are the coefficients of the corresponding Wiener polynomial).

Original entry on oeis.org

1, 3, 2, 1, 7, 8, 8, 4, 1, 15, 22, 31, 28, 17, 6, 1, 31, 52, 90, 112, 104, 68, 30, 8, 1, 63, 114, 225, 344, 418, 388, 270, 136, 47, 10, 1, 127, 240, 516, 908, 1331, 1568, 1464, 1064, 589, 240, 68, 12, 1, 255, 494, 1123, 2180, 3663, 5138, 5931, 5560, 4181, 2482, 1137, 388, 93, 14, 1
Offset: 0

Views

Author

Emeric Deutsch, Jun 22 2011

Keywords

Comments

The binomial trees b(k) of order k are ordered trees defined as follows:
1. b(0) consists of a single node.
2. For k >= 1, b(k) is obtained from two copies of b(k-1) by linking them in such a way that the root of one is the leftmost child of the root of the other. See the Iyer & Reddy references.
Row n contains 2n-1 entries.
Kevin Ryde, Sep 14 2019: (Start)
In the formulas below, the generating function for number of vertices at depth is r(n,t) = (t+1)^n = Sum_{i=0..n} binomial(n,i)*t^i. The w(n,t) recurrence applied repeatedly is a sum of those, and from which the rational function for w(n,t).
T(n,k) as sum over j follows from which binomials are put at which indices in the g.f. Or the direct interpretation is to number vertices v=0 to 2^n-1 inclusive with parent(v) = A129760(v) in the usual way, then suppose a pair of vertices u,v have their highest differing bit at position j, where j=1 as the least significant bit. One of u or v has a 1-bit at j. To be distance k apart requires k-1 further 1-bits among the bits below j in u and v, hence binomial(2(j-1),k-1). The bits above j are the same in u and v and can be any 2^(n-j) (those bits and 0's below are the common ancestor of u,v).
(End)

Examples

			T(2,1)=3, T(2,2)=2, T(2,3)=1 because the binomial tree b(2) is basically the path tree A-B-R-C and we have 3 (AB, BR, RC), 2 (AR, BC), and 1 (AC) pairs of nodes at distances 1, 2, and 3, respectively.
Triangle starts:
   1;
   3,   2,   1;
   7,   8,   8,   4,   1;
  15,  22,  31,  28,  17,   6,   1;
  31,  52,  90, 112, 104,  68,  30,   8,   1;
		

References

  • K. Viswanathan Iyer and K. R. Udaya Kumar Reddy, Wiener index of Binomial trees and Fibonacci trees, Int'l. J. Math. Engin. with Comp., Accepted for publication, Sept. 2009.
  • T. H. Cormen, C. E. Leiserson and R. L. Rivest: Introduction to Algorithms. MIT Press / McGraw-Hill (1990).

Crossrefs

Programs

  • Maple
    G := 1/(1-z-t*z): Gser := simplify(series(G, z = 0, 11)): for n from 0 to 8 do r[n] := sort(coeff(Gser, z, n)) end do: w[0] := 0: for n to 8 do w[n] := sort(expand(2*w[n-1]+t*r[n-1]^2)) end do: for n to 8 do seq(coeff(w[n], t, k), k = 1 .. 2*n-1) end do; # yields sequence in triangular form
  • Mathematica
    max = 8; g = 1/(1 - z - t*z); r = CoefficientList[ Series[g, {z, 0, max}], z]; w[0] = 0; w[n_] := w[n] = 2 w[n-1] + t*r[[n]]^2; Flatten[ Table[ Drop[ CoefficientList[ w[n], t], 1], {n, 1, max}]] (* Jean-François Alcover, Oct 06 2011, after Maple *)
  • PARI
    a(n) = my(s=sqrtint(n),r=n-s^2); sum(i=0,s, 2^(s-i)*binomial(2*i,r)); \\ Kevin Ryde, Sep 13 2019

Formula

T(n,1) = A000225(n) = 2^n - 1.
T(n,2) = A005803(n+1) = 2^(n+1) - 2*n - 2.
Sum_{k>=1} k*T(n,k) = A192021(n) (the Wiener indices).
The Wiener polynomial w(n,t) of the binomial tree of order n satisfies the recurrence relation w(n,t) = 2*w(n-1,t) + t*(r(n-1,t))^2, w(0,t)=0, where r(n,t) is the generating polynomial of the nodes of the binomial tree b(n) with respect to the level of the nodes (for example, r(1,t) = 1 + t for the one-edge tree b(1)= | ; see the Maple program).
T(n,k) = Sum_{j=1..n} 2^(n-j)*binomial(2*j-2, k-1).
w(n,t) = Sum_{i=0..n-1} 2^(n-1-i)*t*(t+1)^(2i) = t * ((t+1)^(2n) - 2^n)/((t+1)^2 - 2). - Kevin Ryde, Sep 13 2019

A271698 Triangle read by rows, T(n,k) = Sum_{j=0..n} C(-j,-n)*E1(j,k), E1 the Eulerian numbers A173018, for n>=0 and 0<=k<=n.

Original entry on oeis.org

1, 1, 0, 0, 1, 0, 0, 2, 1, 0, 0, 2, 8, 1, 0, 0, 2, 28, 22, 1, 0, 0, 2, 72, 182, 52, 1, 0, 0, 2, 164, 974, 864, 114, 1, 0, 0, 2, 352, 4174, 8444, 3474, 240, 1, 0, 0, 2, 732, 15782, 61464, 57194, 12660, 494, 1, 0, 0, 2, 1496, 55286, 373940, 660842, 332528, 43358, 1004, 1, 0
Offset: 0

Views

Author

Peter Luschny, Apr 12 2016

Keywords

Examples

			Triangle starts:
1,
1, 0,
0, 1, 0,
0, 2, 1, 0,
0, 2, 8, 1, 0,
0, 2, 28, 22, 1, 0,
0, 2, 72, 182, 52, 1, 0,
0, 2, 164, 974, 864, 114, 1, 0
		

Crossrefs

A000255 (row sums), compare A028296 for alternating rows sums, A145654 and A005803 (diag. n,n-2).
Cf. A173018.

Programs

  • Maple
    A271698 := (n,k) -> add(binomial(-j,-n)*combinat:-eulerian1(j,k), j=0..n):
    seq(seq(A271698(n, k), k=0..n), n=0..10);
  • Mathematica
    <
    				

A353047 Number of length n words on alphabet {0,1,2} that contain each of the subwords 01, 02, 10, 12, 20, and 21 as (not necessarily contiguous) subwords.

Original entry on oeis.org

12, 108, 600, 2664, 10404, 37476, 127920, 420768, 1348476, 4242204, 13169160, 40490712, 123635028, 375623892, 1137095520, 3433306896, 10347106860, 31141984140, 93639862200, 281372571720, 845074016772, 2537235316548, 7615933808400, 22856659795584, 68588501433564
Offset: 5

Views

Author

Geoffrey Critzer, Apr 19 2022

Keywords

Comments

Let A be an alphabet containing m letters. Let S be the set of m^2-m ordered two-tuples of distinct letters in A. The generating function for the number of length n words on A that contain each two-tuple in S as a (not necessarily contiguous) subword is m*(m-1)!^2*x^(2*m-1)/((1-m*x)*Product_{k=1..m-1} (1-k*x)^2).
Appears to equal 12 times A222993, except that sequence only has a conjectured formula. - N. J. A. Sloane, Jun 17 2022

Examples

			a(5) = 12 because we have: {0, 1, 2, 0, 1}, {0, 1, 2, 1, 0}, {0, 2, 1, 0, 2}, {0, 2, 1, 2, 0}, {1, 0, 2, 0, 1}, {1, 0, 2, 1, 0}, {1, 2, 0, 1, 2}, {1, 2, 0, 2, 1}, {2, 0, 1, 0, 2}, {2, 0, 1, 2, 0}, {2, 1, 0, 1, 2}, {2, 1, 0, 2, 1}.
		

Crossrefs

Cf. A058809, A222993, A005803 (binary words).

Programs

  • Mathematica
    nn = 15; vertices = Level[Outer[ List, {a, b, c}, {d, e, f}, {h, i, j}, {k, l, m}, {n, o, p}, {q, r, s}], {6}]; x = {a -> b, d -> e, i -> j, o -> p}; y = {b -> c, h -> i, k -> l, r -> s}; z = {e -> f, l -> m, n -> o, q -> r}; replacementlist = Table[vertices[[kk]] -> kk, {kk, 1, 729}]; G= Normal[SparseArray[Flatten[Table[Normal[Merge[ Map[{mm, vertices[[mm]] /. # /. replacementlist} -> 1 &, {x, y, z}], Total]], {mm, 1, 729}]]]]; Iwg =
    Inverse[IdentityMatrix[729] - w G]; CoefficientList[ Series[Iwg[[1, 729]], {w, 0, nn}], w]

Formula

G.f.: (12*x^5)/((1 - 2*x)^2*(1 - x)^2*(1 - 3*x)).

A146749 Coefficients of the Pascal sequence minus the Eulerian numbers: q(x,n)= = (1 - x)^(n + 1)*PolyLog[ -n, x]; p(x,n) = (q(x, n)/x - (x + 1)^(n - 1))/x.

Original entry on oeis.org

2, 8, 8, 22, 60, 22, 52, 292, 292, 52, 114, 1176, 2396, 1176, 114, 240, 4272, 15584, 15584, 4272, 240, 494, 14580, 88178, 156120, 88178, 14580, 494, 1004, 47804, 455108, 1310228, 1310228, 455108, 47804, 1004
Offset: 3

Views

Author

Roger L. Bagula, Nov 01 2008

Keywords

Comments

Row sums are: {2, 16, 104, 688, 4976, 40192, 362624, 3628288}.
First row elements/column are A005803;f(n)=2^n - 2n; {2, 8, 22, 52, 114, 240, 494, 1004}.

Examples

			Triangle begins:
  {2},
  {8, 8},
  {22, 60, 22},
  {52, 292, 292, 52},
  {114, 1176, 2396, 1176, 114},
  {240, 4272, 15584, 15584, 4272, 240},
  {494, 14580, 88178, 156120, 88178, 14580, 494},
  {1004, 47804, 455108, 1310228, 1310228, 455108, 47804, 1004}
  ...
		

Crossrefs

Cf. A005803.

Programs

  • Mathematica
    q[x_, n_] = (1 - x)^(n + 1)*PolyLog[ -n, x]; p[x_, n_] = (q[x, n]/x - (x + 1)^(n - 1))/x; Table[CoefficientList[FullSimplify[ExpandAll[p[x, n]]], x], {n, 3, 10}]; Flatten[%]

Formula

q(x,n) = (1 - x)^(n + 1)*PolyLog[ -n, x]; p(x,n) = (q(x, n)/x - (x + 1)^(n - 1))/x; t(n,m)=Coefficients(p(x,n)).

A146750 Coefficients of the Pascal sequence minus the Eulerian numbers with first and last columns subtracted: f(n)=2^n - 2n; q(x,n)= = (1 - x)^(n + 1)*PolyLog[ -n, x]; p(x,n) = ((q(x, n)/x - (x + 1)^(n - 1))/x - f[n] - f[n]*x^(n - 3))/x.

Original entry on oeis.org

60, 292, 292, 1176, 2396, 1176, 4272, 15584, 15584, 4272, 14580, 88178, 156120, 88178, 14580, 47804, 455108, 1310228, 1310228, 455108, 47804
Offset: 5

Views

Author

Roger L. Bagula, Nov 01 2008

Keywords

Comments

Row sums are:{60, 584, 4748, 39712, 361636, 3626280}. First row elements/column are: {60, 292, 1176, 4272, 14580, 47804}.

Examples

			{2}, {8, 8}, {22, 60, 22}, {52, 292, 292, 52}, {114, 1176, 2396, 1176, 114}, {240, 4272, 15584, 15584, 4272, 240}, {494, 14580, 88178, 156120, 88178, 14580, 494}, {1004, 47804, 455108, 1310228, 1310228, 455108, 47804, 1004}
		

Crossrefs

Programs

  • Mathematica
    f[n_] = 2^n - 2n; q[x_, n_] = (1 - x)^(n + 1)*PolyLog[ -n, x]; p[x_, n_] = ((q[x, n]/x - (x + 1)^(n - 1))/x - f[n] - f[n]*x^(n - 3))/x Table[CoefficientList[FullSimplify[ExpandAll[p[x, n]]], x], {n, 5, 10}] Flatten[%]

Formula

f(n)=2^n - 2n; q(x,n)= = (1 - x)^(n + 1)*PolyLog[ -n, x]; p(x,n) = ((q(x, n)/x - (x + 1)^(n - 1))/x - f[n] - f[n]*x^(n - 3))/x; t(n,m)=Coefficients(p(x,n)).

A347976 Triangle T(n,k) read by rows: the rows list volumes of rank 2 Schubert matroid polytopes.

Original entry on oeis.org

1, 2, 4, 3, 8, 11, 4, 13, 22, 26, 5, 19, 38, 52, 57, 6, 26, 60, 94, 114, 120, 7, 34, 89, 158, 213, 240, 247, 8, 43, 126, 251, 376, 459, 494, 502, 9, 53, 172, 381, 632, 841, 960, 1004, 1013, 10, 64, 228, 557, 1018, 1479, 1808, 1972, 2026, 2036, 11, 76, 295, 789, 1580, 2503, 3294, 3788, 4007, 4072, 4083
Offset: 3

Views

Author

Keywords

Comments

T(n,k) is the volume of the base polytope of the Lattice Path Matroid bounded by the paths L = (n-2)*[0]+[1,1] and U = [1]+(n-k-2)*[0]+[1]+(k)*[0].

Examples

			The triangle T(n,k) starts as follows:
[n\k] [1] [2]  [3]   [4]   [5]   [6]   [7]   [8]   [9]  [10]  [11]  [12]
[3]    1;
[4]    2,  4;
[5]    3,  8,  11;
[6]    4, 13,  22,   26;
[7]    5, 19,  38,   52,   57;
[8]    6, 26,  60,   94,  114,  120;
[9]    7, 34,  89,  158,  213,  240,  247;
[10]   8, 43, 126,  251,  376,  459,  494,  502;
[11]   9, 53, 172,  381,  632,  841,  960, 1004, 1013;
[12]  10, 64, 228,  557, 1018, 1479, 1808, 1972, 2026, 2036;
[13]  11, 76, 295,  789, 1580, 2503, 3294, 3788, 4007, 4072, 4083;
[14]  12, 89, 374, 1088, 2374, 4089, 5804, 7090, 7804, 8089, 8166, 8178;
...
		

Crossrefs

Columns: A000027 (k=1), A034856 (k=2).
Diagonals: A000295 (k=n-2), A005803 (k=n-3), A277411 (k=n-4).

Formula

T(n,k-1) + T(n,k) + k = T(n+1,k).
For a fixed k, the column T(n,k) is given by a polynomial in n.
For any 1 <= k <= n-3, T(n,k) + T(n,n-k-2) = T(n,n-2).
Previous Showing 31-38 of 38 results.