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 21-30 of 38 results. Next

A288874 Row reversed version of triangle A201637 (second-order Eulerian triangle).

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 6, 8, 1, 0, 24, 58, 22, 1, 0, 120, 444, 328, 52, 1, 0, 720, 3708, 4400, 1452, 114, 1, 0, 5040, 33984, 58140, 32120, 5610, 240, 1, 0, 40320, 341136, 785304, 644020, 195800, 19950, 494, 1, 0, 362880, 3733920, 11026296, 12440064, 5765500, 1062500, 67260, 1004, 1, 0, 3628800, 44339040, 162186912, 238904904, 155357384, 44765000, 5326160, 218848, 2026, 1
Offset: 0

Views

Author

Wolfdieter Lang, Jul 20 2017

Keywords

Comments

See A201637, and also A008517 (offset 1 for rows and columns).
The row polynomials of this triangle P(n, x) = Sum_{m=0..n} T(n, m)*x^m appear as numerator polynomials in the o.g.f.s for the diagonal sequences of triangle A132393 (|Stirling1| with offset 0 for rows and columns). See the comment and the P. Bala link there.
For similar triangles see also A112007 and A163936.

Examples

			The triangle T(n, m) begins:
n\m 0      1       2        3        4       5       6     7    8  9 ...
0:  1
1:  0      1
2:  0      2       1
3:  0      6       8        1
4:  0     24      58       22        1
5:  0    120     444      328       52       1
6:  0    720    3708     4400     1452     114       1
7:  0   5040   33984    58140    32120    5610     240     1
8:  0  40320  341136   785304   644020  195800   19950   494    1
9:  0 362880 3733920 11026296 12440064 5765500 1062500 67260 1004  1
...
		

Crossrefs

Columns m = 0..5: A000007, A000142, A002538, A002539, A112008, A112485.
Diagonals d = 0..3: A000012, A005803, A004301, A006260.
T(2n,n) gives A290306.

Programs

  • Maple
    T:= (n, k)-> combinat[eulerian2](n, n-k):
    seq(seq(T(n, k), k=0..n), n=0..12);  # Alois P. Heinz, Jul 26 2017
    # Using the e.g.f:
    alias(W = LambertW): len := 10:
    egf := (t - 1)*(1/(W(-exp(((t - 1)^2*x - 1)/t)/t) + 1) - 1):
    ser := simplify(subs(W(-exp(-1/t)/t) = (-1/t), series(egf, x, len+1))):
    seq(seq(n!*coeff(coeff(ser, x, n), t, k), k = 0..n), n = 0..len);  # Peter Luschny, Mar 13 2025
  • Mathematica
    Table[Boole[n == 0] + Sum[(-1)^(n + k) * Binomial[2 n + 1, k] StirlingS1[2 n - m - k, n - m - k], {k, 0, n - m - 1}], {n, 0, 10}, {m, n, 0, -1}] // Flatten (* Michael De Vlieger, Jul 21 2017, after Jean-François Alcover at A201637 *)

Formula

T(n, m) = A201637(n, n-m), n >= m >= 0.
Recurrence: T(0, 0) = 1, T(n, -1) = 0, T(n, m) = 0 if n < m, (n-m+1)*T(n-1, m-1) + (n-1+m)*T(n-1, m), n >= 1, m = 0..n; from the A008517 recurrence.
T(0, 0) = 1, T(n, m) = Sum_{p = 0..m-1} (-1)^(n-p)*binomial(2*n+1, p)*A132393(n+m-p, m-p), n >= 1, m = 0..n; from a A008517 program.
T(n, k) = n! * [t^k][x^n] (t - 1)*(1/(W(-exp(((t - 1)^2*x - 1)/t)/t) + 1) - 1) where after expansion W(-exp(-1/t)/t) is substituted by (-1/t). [Inspired by a formula of Shamil Shakirov in A008517.] - Peter Luschny, Mar 13 2025

A294619 a(0) = 0, a(1) = 1, a(2) = 2 and a(n) = 1 for n > 2.

Original entry on oeis.org

0, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Keywords

Comments

Continued fraction expansion of (sqrt(5) + 1)/(2*sqrt(5)).
Inverse binomial transform is {0, 1, 4, 10, 21, 41, 78, 148, ...}, A132925 with one leading zero.
Also the main diagonal in the expansion of (1 + x)^n - 1 + x^2 (A300453).
The partial sum of this sequence is A184985.
a(n) is the number of state diagrams having n components that are obtained from an n-foil [(2,n)-torus knot] shadow. Let a shadow diagram be the regular projection of a mathematical knot into the plane, where the under/over information at every crossing is omitted. A state for the shadow diagram is a diagram obtained by merging either of the opposite areas surrounding each crossing.
a(n) satisfies the identities a(n)^a(n+k) = a(n), 2^a(k) = 2*a(k) and a(k)! = a(k), k > 0.
Also the number of non-isomorphic simple connected undirected graphs with n+1 edges and a longest path of length 2. - Nathaniel Gregg, Nov 02 2021

Examples

			For n = 2, the shadow of the Hopf link yields 2 two-component state diagrams (see example in A300453). Thus a(2) = 2.
		

References

  • V. I. Arnold, Topological Invariants of Plane Curves and Caustics, American Math. Soc., 1994.
  • L. H. Kauffman, Knots and Physics, World Scientific Publishers, 1991.
  • V. Manturov, Knot Theory, CRC Press, 2004.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(x + x^2 - x^3)/(1 - x), {x, 0, 100}], x] (* Wesley Ivan Hurt, Nov 05 2017 *)
    f[n_] := If[n > 2, 1, n]; Array[f, 105, 0] (* Robert G. Wilson v, Dec 27 2017 *)
    PadRight[{0,1,2},120,{1}] (* Harvey P. Dale, Feb 20 2023 *)
  • Maxima
    makelist((1 + (-1)^((n + 1)!))/2 + kron_delta(n, 2), n, 0, 100);
  • PARI
    a(n) = if(n>2, 1, n);
    

Formula

a(n) = ((-1)^2^(n^2 + 3*n + 2) + (-1)^2^(n^2 - n) - (-1)^2^(n^2 - 3*n + 2) + 1)/2.
a(n) = (1 + (-1)^((n + 1)!))/2 + Kronecker(n, 2).
a(n) = min(n, 3) - 2*(max(n - 2, 0) - max(n - 3, 0)).
a(n) = floor(F(n+1)/F(n)) for n > 0, with a(0) = 0, where F(n) = A000045(n) is the n-th Fibonacci number.
a(n) = a(n-1) for n > 3, with a(0) = 0, a(1) = 1, a(2) = 2 and a(3) = 1.
A005803(a(n)) = A005096(a(n)) = A000007(n).
A107583(a(n)) = A103775(n+5).
a(n+1) = 2^A185012(n+1), with a(0) = 0.
a(n) = A163985(n) mod A004278(n+1).
a(n) = A157928(n) + A171386(n+1).
a(n) = A063524(n) + A157928(n) + A185012(n).
a(n) = A010701(n) - A141044(n) - A179184(n).
G.f.: (x + x^2 - x^3)/(1 - x).
E.g.f.: (2*exp(x) - 2 + x^2)/2.

A321268 Number of permutations on [n] whose up-down signature has nonnegative partial sums and which have exactly two descents.

Original entry on oeis.org

0, 0, 0, 0, 22, 172, 856, 3488, 12746, 43628, 143244, 457536, 1434318, 4438540, 13611136, 41473216, 125797010, 380341580, 1147318004, 3455325600, 10394291094, 31242645420, 93853769320, 281825553760, 846030314842, 2539248578732, 7620161662556, 22865518160768
Offset: 1

Views

Author

Sam Spiro, Nov 01 2018

Keywords

Comments

Also the number of permutations of [n] of odd order whose M statistic (as defined in the Spiro paper) is equal to two.

Examples

			Some permutations counted by a(5) include 14253 and 34521.
		

Crossrefs

Column k=2 of A321280.

Programs

  • Mathematica
    a[1] = 0; a[n_] := 2n^2 - 2n - 1 - n 2^(n-1) - 2 Binomial[n, 3] + Sum[ Binomial[n, k] (2^k - 2k), {k, 0, n}];
    Table[a[n], {n, 1, 28}] (* Jean-François Alcover, Nov 11 2018 *)
  • PARI
    a(n)={if(n<2, 0, 2*n^2 - 2*n - 1 - n*2^(n-1) - 2*binomial(n,3) + sum(k=0, n, binomial(n, k)*(2^k - 2*k)))} \\ Andrew Howroyd, Nov 01 2018
    
  • PARI
    concat([0,0,0,0], Vec(2*x^5*(11 - 35*x + 32*x^2 - 6*x^3) / ((1 - x)^4*(1 - 2*x)^2*(1 - 3*x)) + O(x^40))) \\ Colin Barker, Mar 07 2019

Formula

a(n) = 3*A008292(n-1,3)- 2*binomial(n,3)+binomial(n,2)-1 for n > 1.
a(n) = A065826(n-1,3)- 2*binomial(n,3)+binomial(n,2)-1 for n > 1.
a(n) = 3^n-3*n*2^(n-1)-2*binomial(n,3)+4*binomial(n,2)-1 for n > 1.
From Colin Barker, Mar 07 2019: (Start)
G.f.: 2*x^5*(11 - 35*x + 32*x^2 - 6*x^3) / ((1 - x)^4*(1 - 2*x)^2*(1 - 3*x)).
a(n) = 11*a(n-1) - 50*a(n-2) + 122*a(n-3) - 173*a(n-4) + 143*a(n-5) - 64*a(n-6) + 12*a(n-7) for n>8.
a(n) = -1 + 3^n - (16+9*2^n)*n/6 + 3*n^2 - n^3/3 for n>1.
(End)

A321269 Number of permutations on [n] whose up-down signature has nonnegative partial sums and which have exactly three descents.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 604, 7296, 54746, 330068, 1756878, 8641800, 40298572, 180969752, 790697160, 3385019968, 14270283414, 59457742524, 245507935018, 1006678811272, 4105447763032, 16672235476128, 67482738851220, 272439143364672, 1097660274098482, 4415486996246052
Offset: 1

Views

Author

Sam Spiro, Nov 01 2018

Keywords

Comments

Also the number of permutations of [n] of odd order whose M statistic (as defined in the Spiro paper) is equal to three.

Examples

			The permutations counted by a(7) include 1237654 and 17265243.
		

Crossrefs

Column k=3 of A321280.

Programs

  • Mathematica
    t[n_, k_] := Sum[(-1)^j (k - j)^n Binomial[n + 1, j], {j, 0, k}];
    a[n_] := If[n<7, 0, 4 t[n-1, 4] - (Binomial[n, 3] - Binomial[n, 2] + 4) * 2^(n-2) - 22 Binomial[n, 5] + 16 Binomial[n, 4] - 4 Binomial[n, 3] + 2n];
    Array[a, 30] (* Jean-François Alcover, Feb 29 2020, from Sam Spiro's 1st formula *)
  • PARI
    concat([0,0,0,0,0,0], Vec(2*x^7*(302 - 3600*x + 18341*x^2 - 52006*x^3 + 89327*x^4 - 94728*x^5 + 61016*x^6 - 23368*x^7 + 5424*x^8 - 576*x^9) / ((1 - x)^6*(1 - 2*x)^4*(1 - 3*x)^2*(1 - 4*x)) + O(x^30))) \\ Colin Barker, Mar 07 2019

Formula

From Sam Spiro, Mar 07 2019: (Start)
a(n) = 4*A008292(n-1,4)-(binomial(n,3)-binomial(n,2)+4)*2^(n-2)-22*binomial(n,5)+16*binomial(n,4)-4*binomial(n,3)+2n for n>3.
a(n) = A065826(n-1,4)-(binomial(n,3)-binomial(n,2)+4)*2^(n-2)-22*binomial(n,5)+16*binomial(n,4)-4*binomial(n,3)+2n for n>3.
a(n) = 4^n-4*n*3^(n-1)+9*binomial(n,2)*2^(n-2)-binomial(n,3)*2^(n-2)-2^n-8*binomial(n,3)-22*binomial(n,5)+16*binomial(n,4)+2*n for n>3.
(End)
From Colin Barker, Mar 07 2019: (Start)
G.f.: 2*x^7*(302 - 3600*x + 18341*x^2 - 52006*x^3 + 89327*x^4 - 94728*x^5 + 61016*x^6 - 23368*x^7 + 5424*x^8 - 576*x^9) / ((1 - x)^6*(1 - 2*x)^4*(1 - 3*x)^2*(1 - 4*x)).
a(n) = 24*a(n-1) - 260*a(n-2) + 1684*a(n-3) - 7278*a(n-4) + 22172*a(n-5) - 49004*a(n-6) + 79596*a(n-7) - 95065*a(n-8) + 82508*a(n-9) - 50616*a(n-10) + 20800*a(n-11) - 5136*a(n-12) + 576*a(n-13) for n>16.
(End)

Extensions

More terms from Alois P. Heinz, Nov 01 2018

A135835 Lower triangular matrix T with first column and diagonal (1,2,3,4,...,n,...) and otherwise satisfying T(i,j) = Sum_{k=1..j} T(i-j+1,k)*T(j,k), read by rows.

Original entry on oeis.org

1, 2, 2, 3, 8, 3, 4, 22, 22, 4, 5, 52, 82, 52, 5, 6, 114, 254, 254, 114, 6, 7, 240, 677, 1000, 677, 240, 7, 8, 494, 1692, 3176, 3176, 1692, 494, 8, 9, 1004, 3972, 9136, 12182, 9136, 3972, 1004, 9, 10, 2026, 9052, 24202, 40564, 40564, 24202, 9052, 2026, 10, 11, 4072, 19975, 60828, 123414, 155096, 123414, 60828, 19975, 4072, 11
Offset: 1

Views

Author

John W. Layman, Nov 30 2007

Keywords

Comments

The definition is equivalent to requiring that L'=L*Transpose(L), where L' is formed from L by shifting column j upward j-1 rows for all j. If the first column is (1,1,1,1,...,1,...} then the lower triangular matrix contains Pascal's triangle. Column two and one-half of column two are essentially A005803 (second-order Eulerian numbers 2^n - 2*n) and A000295 (Eulerian numbers 2^n - n - 1), respectively. Column three is A135836.

Examples

			From _Philippe Deléham_, Oct 10 2011: (Start)
Triangle begins:
  1;
  2,   2;
  3,   8,   3;
  4,  22,  22,   4;
  5,  52,  82,  52,   5;
  6, 114, 254, 254, 114,   6;
  ...
(End)
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_]:= T[n, k]= If[k<1 || k>n, 0, If[k==1 || k==n, n, Sum[T[n-k+1, j]*T[k, j], {j, k}]]];
    Table[T[n, k], {n,12}, {k,n}]//Flatten (* G. C. Greubel, Feb 07 2022 *)
  • PARI
    T(i,j) = if (j>i, 0, if ((j==1) || (i==j), i, sum(k=1, j, T(i-j+1,k)*T(j,k))));
    tabl(nn) = for (n=1, nn, for (k=1, n, print1(T(n, k), ", ")); print()); \\ Michel Marcus, Sep 30 2017
    
  • Sage
    @CachedFunction
    def T(n,k): # A135835
        if (k<0 or k>n): return 0
        elif (k==1 or k==n): return n
        else: return sum( T(n-k+1,j)*T(k,j) for j in (1..k) )
    flatten([[T(n,k) for k in (1..n)] for n in (1..12)])  # G. C. Greubel, Feb 07 2022

Formula

T(n, 1) = T(n, n) = n, otherwise T(n,k) = Sum_{j=1..k} T(n-k+1, j)*T(k, j).
T(n, n-k) = T(n, k).
T(n, 2) = A005803(n+1) = 2*A000295(n).
T(n, 3) = A135836(n-2).

Extensions

Name and formula corrected, and more terms from Michel Marcus, Sep 30 2017

A135836 Column three of the triangular matrix in A135835.

Original entry on oeis.org

3, 22, 82, 254, 677, 1692, 3972, 9052, 19975, 43394, 92534, 195546, 408489, 848584, 1749544, 3594104, 7345547, 14976366, 30424986, 61706038, 124829101, 252226676, 508704716, 1025115156, 2062984719, 4149086938, 8336437438, 16742227730, 33599246513, 67406551968
Offset: 1

Views

Author

John W. Layman, Nov 30 2007

Keywords

Comments

Column two of the associated matrix is A005803.

Crossrefs

Programs

  • Magma
    [(1/12)*(330 +78*n +3*2^(n+8) -(1-(-1)^n)*106*3^((n+3)/2) -(1+(-1)^n)*61*3^(2 +n/2)): n in [1..40]]; // G. C. Greubel, Feb 07 2022
    
  • Mathematica
    LinearRecurrence[{4,-2,-10,15,-6}, {3,22,82,254,677}, 40] (* G. C. Greubel, Feb 07 2022 *)
  • SageMath
    def a(n):
        if (n%2==0): return (1/2)*(55 + 13*n + 2^(n+7) -61*3^(n/2+1))
        else: return (1/2)*(55 + 13*n + 2^(n+7) - 106*3^((n+1)/2))
    [a(n) for n in (1..40)] # G. C. Greubel, Feb 07 2022

Formula

From G. C. Greubel, Feb 07 2022: (Start)
a(n) = (1/4)*(110 + 26*n + 2^(n+8) - (1 - (-1)^n)*106*3^((n+1)/2) - (1 + (-1)^n)*61*3^(1+n/2)).
a(2*n) = (1/2)*(55 + 26*n + 2^(2*n+7) - 61*3^(n+1)).
a(2*n+1) = (1/2)*(68 + 26*n + 4^(n+4) - 106*3^(n+1)).
G.f.: x*(3 + 10*x)/((1-x)^2*(1 - 2*x - 3*x^2 + 6*x^3)).
E.g.f.: (1/2)*( (55 + 13*x)*exp(x) + 128*exp(2*x) - 183*cosh(sqrt(3)*x) - 106*sqrt(3)*sinh(sqrt(3)*x) ). (End)

Extensions

Terms a(14) onward added by G. C. Greubel, Feb 07 2022

A198396 a(n) = 6^n - 6*n.

Original entry on oeis.org

1, 0, 24, 198, 1272, 7746, 46620, 279894, 1679568, 10077642, 60466116, 362796990, 2176782264, 13060693938, 78364164012, 470184984486, 2821109907360, 16926659444634, 101559956668308, 609359740010382, 3656158440062856, 21936950640377730, 131621703842267004, 789730223053602678
Offset: 0

Views

Author

Vincenzo Librandi, Oct 26 2011

Keywords

Crossrefs

Programs

  • Magma
    [6^n-6*n: n in [0..25]];
    
  • Mathematica
    CoefficientList[Series[(1 - 8*x + 37*x^2)/((1 - 6*x)*(1 -x)^2), {x, 0, 30}], x] (* Vincenzo Librandi, Jan 04 2013 *)
    Table[6^n-6n,{n,0,30}] (* or *) LinearRecurrence[{8,-13,6},{1,0,24},30] (* Harvey P. Dale, Jul 25 2019 *)
  • PARI
    a(n)=6^n-6*n \\ Charles R Greathouse IV, Jul 06 2017

Formula

a(n) = 8*a(n-1) - 13*a(n-2) + 6*a(n-3) for n > 2.
G.f.: (1-8*x+37*x^2)/((1-6*x)*(1-x)^2). - Vincenzo Librandi, Jan 04 2013
E.g.f.: exp(x)*(exp(5*x) - 6*x). - Elmo R. Oliveira, Sep 10 2024

A198397 a(n) = 7^n - 7*n.

Original entry on oeis.org

1, 0, 35, 322, 2373, 16772, 117607, 823494, 5764745, 40353544, 282475179, 1977326666, 13841287117, 96889010316, 678223072751, 4747561509838, 33232930569489, 232630513987088, 1628413597910323, 11398895185373010, 79792266297611861, 558545864083283860, 3909821048582987895
Offset: 0

Views

Author

Vincenzo Librandi, Oct 26 2011

Keywords

Crossrefs

Programs

  • Magma
    [7^n-7*n: n in [0..25]];
    
  • Mathematica
    CoefficientList[Series[(1 - 9*x + 50*x^2)/((1 - 7*x)*(1 -x)^2), {x, 0, 30}], x] (* Vincenzo Librandi, Jan 04 2013 *)
  • PARI
    a(n)=7^n-7*n \\ Charles R Greathouse IV, Jul 06 2017

Formula

a(n) = 9*a(n-1) - 15*a(n-2) + 7*a(n-3) for n > 2.
G.f.: (1 - 9*x + 50*x^2)/((1 - 7*x)*(1 -x)^2). - Vincenzo Librandi, Jan 04 2013
E.g.f.: exp(x)*(exp(6*x) - 7*x). - Elmo R. Oliveira, Sep 10 2024

A198398 a(n) = 8^n - 8n.

Original entry on oeis.org

1, 0, 48, 488, 4064, 32728, 262096, 2097096, 16777152, 134217656, 1073741744, 8589934504, 68719476640, 549755813784, 4398046510992, 35184372088712, 281474976710528, 2251799813685112, 18014398509481840, 144115188075855720, 1152921504606846816, 9223372036854775640
Offset: 0

Views

Author

Vincenzo Librandi, Oct 26 2011

Keywords

Crossrefs

Programs

  • Magma
    [8^n-8*n: n in [0..25]];
    
  • Mathematica
    CoefficientList[Series[(1 - 10*x + 65*x^2)/((1 - 8*x)*(1 -x)^2), {x, 0, 30}], x] (* Vincenzo Librandi, Jan 04 2013 *)
    LinearRecurrence[{10,-17,8},{1,0,48},30] (* Harvey P. Dale, Mar 13 2023 *)
  • PARI
    a(n)=8^n-8*n \\ Charles R Greathouse IV, Jul 06 2017

Formula

a(n) = 10*a(n-1) - 17*a(n-2) + 8*a(n-3) for n > 2.
G.f.: (1 - 10*x + 65*x^2)/((1 - 8*x)*(1 -x)^2). - Vincenzo Librandi, Jan 04 2013
E.g.f.: exp(x)*(exp(7*x) - 8*x). - Elmo R. Oliveira, Sep 10 2024

A198399 a(n) = 9^n - 9*n.

Original entry on oeis.org

1, 0, 63, 702, 6525, 59004, 531387, 4782906, 43046649, 387420408, 3486784311, 31381059510, 282429536373, 2541865828212, 22876792454835, 205891132094514, 1853020188851697, 16677181699666416, 150094635296998959, 1350851717672991918, 12157665459056928621, 109418989131512359020
Offset: 0

Views

Author

Vincenzo Librandi, Oct 26 2011

Keywords

Crossrefs

Programs

  • Magma
    [9^n-9*n: n in [0..25]];
    
  • Mathematica
    CoefficientList[Series[(1 - 11*x + 82*x^2)/((1 - 9*x)*(1 - x)^2), {x, 0, 30}], x] (* Vincenzo Librandi, Jan 04 2013 *)
  • PARI
    a(n)=9^n-9*n \\ Charles R Greathouse IV, Jul 06 2017

Formula

a(0)=1, a(1)=0, a(2)=63, a(n) = 11*a(n-1) - 19*a(n-2) + 9*a(n-3).
G.f.: (1 - 11*x + 82*x^2)/((1 - 9*x)*(1 - x)^2). - Vincenzo Librandi, Jan 04 2013
E.g.f.: exp(x)*(exp(8*x) - 9*x). - Elmo R. Oliveira, Sep 09 2024
Previous Showing 21-30 of 38 results. Next