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

A080247 Formal inverse of triangle A080246. Unsigned version of A080245.

Original entry on oeis.org

1, 2, 1, 6, 4, 1, 22, 16, 6, 1, 90, 68, 30, 8, 1, 394, 304, 146, 48, 10, 1, 1806, 1412, 714, 264, 70, 12, 1, 8558, 6752, 3534, 1408, 430, 96, 14, 1, 41586, 33028, 17718, 7432, 2490, 652, 126, 16, 1, 206098
Offset: 0

Views

Author

Paul Barry, Feb 15 2003

Keywords

Comments

Row sums are little Schroeder numbers A001003. Diagonal sums are generalized Fibonacci numbers A006603. Columns include A006318, A006319, A006320, A006321.
T(n,k) is the number of dissections of a convex (n+3)-gon by nonintersecting diagonals with exactly k diagonals emanating from a fixed vertex. Example: T(2,1)=4 because the dissections of the convex pentagon ABCDE having exactly one diagonal emanating from the vertex A are: {AC}, {AD}, {AC,EC} and {AD,BD}. - Emeric Deutsch, May 31 2004
For more triangle sums, see A180662, see the Schroeder triangle A033877 which is the mirror of this triangle. - Johannes W. Meijer, Jul 15 2013

Examples

			Triangle starts:
[0]    1
[1]    2,    1
[2]    6,    4,   1
[3]   22,   16,   6,   1
[4]   90,   68,  30,   8,  1
[5]  394,  304, 146,  48, 10,  1
[6] 1806, 1412, 714, 264, 70, 12, 1
...
From _Gary W. Adamson_, Jul 25 2011: (Start)
n-th row = top row of M^n, M = the following infinite square production matrix:
  2, 1, 0, 0, 0, ...
  2, 2, 1, 0, 0, ...
  2, 2, 2, 1, 0, ...
  2, 2, 2, 2, 1, ...
  ... (End)
		

Crossrefs

Cf. A000007, A033877 (mirror), A084938.

Programs

  • Maple
    A080247:=(n,k)->(k+1)*add(binomial(n+1,k+j+1)*binomial(n+j,j),j=0..n-k)/(n+1):
    seq(seq(A080247(n,k),k=0..n),n=0..9);
  • Mathematica
    Clear[w] w[n_, k_] /; k < 0 || k > n := 0 w[0,0]=1 ; w[n_, k_] /; 0 <= k <= n && !n == k == 0 := w[n, k] = w[n-1,k-1] + w[n-1,k] + w[n,k+1] Table[w[n,k],{n,0,10},{k,0,n}] (* David Callan, Jul 03 2006 *)
    T[n_, k_] := Binomial[n, k] Hypergeometric2F1[k - n, n + 1, k + 2, -1];
    Table[T[n, k], {n, 0, 8}, {k, 0, n}] // Flatten (* Peter Luschny, Jan 08 2018 *)
  • Maxima
    T(n,k):=((k+1)*sum(2^m*binomial(n+1,m)*binomial(n-k-1,n-k-m),m,0,n-k))/(n+1); /* Vladimir Kruchinin, Jan 10 2022 */
  • Sage
    def A080247_row(n):
        @cached_function
        def prec(n, k):
            if k==n: return 1
            if k==0: return 0
            return prec(n-1,k-1)-2*sum(prec(n,k+i-1) for i in (2..n-k+1))
        return [(-1)^(n-k)*prec(n, k) for k in (1..n)]
    for n in (1..10): print(A080247_row(n)) # Peter Luschny, Mar 16 2016
    

Formula

G.f.: 2/(2+y*x-y+y*(x^2-6*x+1)^(1/2))/y/x. - Vladeta Jovovic, Feb 16 2003
Essentially same triangle as triangle T(n,k), n > 0 and k > 0, read by rows; given by [0, 2, 1, 2, 1, 2, 1, 2, 1, 2, ...] DELTA A000007 where DELTA is Deléham's operator defined in A084938.
T(n, k) = T(n-1, k-1) + 2*Sum_{j>=0} T(n-1, k+j) with T(0, 0) = 1 and T(n, k)=0 if k < 0. - Philippe Deléham, Jan 19 2004
T(n, k) = (k+1)*Sum_{j=0..n-k} (binomial(n+1, k+j+1)*binomial(n+j, j))/(n+1). - Emeric Deutsch, May 31 2004
Recurrence: T(0,0)=1; T(n,k) = T(n-1,k-1) + T(n-1,k) + T(n,k+1). - David Callan, Jul 03 2006
T(n, k) = binomial(n, k)*hypergeom([k - n, n + 1], [k + 2], -1). - Peter Luschny, Jan 08 2018
T(n,k) = (k+1)/(n+1)*Sum_{m=0..n-k} 2^m*binomial(n+1,m)*binomial(n-k-1,n-k-m). - Vladimir Kruchinin, Jan 10 2022
From Peter Bala, Sep 16 2024: (Start)
Riordan array (S(x), x*S(x)), where S(x) = (1 - x - sqrt(1 - 6*x + x^2))/(2*x) is the g.f. of the large Schröder numbers A006318.
For integer m and n >= 1, (m + 2)*[x^n] S(x)^(m*n) = m*[x^n] (1/S(-x))^((m+2)*n). For cases of this identity see A103885 (m = 1), A333481 (m = 2) and A370102 (m = 3). (End)

A002464 Hertzsprung's problem: ways to arrange n non-attacking kings on an n X n board, with 1 in each row and column. Also number of permutations of length n without rising or falling successions.

Original entry on oeis.org

1, 1, 0, 0, 2, 14, 90, 646, 5242, 47622, 479306, 5296790, 63779034, 831283558, 11661506218, 175203184374, 2806878055610, 47767457130566, 860568917787402, 16362838542699862, 327460573946510746, 6880329406055690790, 151436547414562736234, 3484423186862152966838
Offset: 0

Views

Author

Keywords

Comments

Permutations of 12...n such that none of the following occur: 12, 23, ..., (n-1)n, 21, 32, ..., n(n-1).
This sequence is also the solution to the 'toast problem' devised by my house-mates and me as math undergraduates some 27 years ago: Given a toast rack with n slots, how many ways can the slices be removed so that no two consecutive slices are removed from adjacent slots? - David Jones (david.jones(AT)zetnet.co.uk), Oct 24 2003
This sequence was also derived by the late D. P. Robbins. - David Callan, Nov 04 2003
Another interpretation: number of permutations of n containing exactly n different patterns of size n-1. - Olivier Gérard, Nov 05 2007
Number of directed Hamiltonian paths in the complement of the n-path graph P_n. - Andrew Howroyd, Mar 16 2016
There is an obvious connection between the two descriptions of the sequence: Replace the chessboard with a n X n zero-matrix and each king with "1". This matrix will transform the vector (1,2,..,n) into a permutation such that adjacent components do not differ by 1. The reverse is also true: Any such transformation is a solution of the king problem. - Gerhard Kirchner, Feb 10 2017
A formula of Poulet (1919) relates this to A326411: a(n) = T(n+2,1)/(n+2) + 2*T(n+1,1)/(n+1) + T(n,1)/n, where T(i,j) = A326411(i,j). - N. J. A. Sloane, Mar 08 2022
For the number of these permutations without fixed points see A288208. - Wolfdieter Lang, May 22 2025

Examples

			a(4) = 2: 2413, 3142.
a(5) = 14 corresponds to these 14 permutations of length 5: 13524, 14253, 24135, 24153, 25314, 31425, 31524, 35142, 35241, 41352, 42513, 42531, 52413, 53142.
		

References

  • W. Ahrens, Mathematische Unterhaltungen und Spiele. Teubner, Leipzig, Vol. 1, 3rd ed., 1921; Vol. 2, 2nd ed., 1918. See Vol. 1, p. 271.
  • F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 263.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Problem 6.40.

Crossrefs

Equals 2*A001266(n) for n >= 2. A diagonal of A001100. Cf. A010028.
Column k=1 of A333706.

Programs

  • Maple
    A002464 := proc(n) options remember; if n <= 1 then 1 elif n <= 3 then 0 else (n+1)*A002464(n-1)-(n-2)*A002464(n-2)-(n-5)*A002464(n-3)+(n-3)*A002464(n-4); fi; end;
  • Mathematica
    (* computation from the permutation class *)
    g[ L_ ] := Apply[ And, Map[ #>1&, L ] ]; f[ n_ ] := Length[ Select[ Permutations[ Range[ n ] ], g[ Rest[ Abs[ RotateRight[ # ]-# ] ] ]& ] ]; Table[ f[ n ], {n, 1, 8} ] (* Erich Friedman *)
    (* or direct computation of terms *)
    Table[n! + Sum[(-1)^r*(n-r)!*Sum[2^c *Binomial[r-1,c-1] *Binomial[n-r,c], {c,1,r}], {r,1,n-1}], {n,1,30}] (* Vaclav Kotesovec, Mar 28 2011 *)
    (* or from g.f. *)
    M = 30; CoefficientList[Sum[n!*x^n*(1-x)^n/(1+x)^n, {n, 0, M}] + O[x]^M, x] (* Jean-François Alcover, Jul 07 2015 *)
    CoefficientList[Series[Exp[(1 + x)/((-1 + x) x)] (1 + x) Gamma[0, (1 + x)/((-1 + x) x)]/((-1 + x) x), {x, 0, 20}], x] (* Eric W. Weisstein, Apr 11 2018 *)
    RecurrenceTable[{a[n] == (n + 1) a[n - 1] - (n - 2) a[n - 2] - (n - 5) a[n - 3] + (n - 3) a[n - 4], a[0] == a[1] == 1, a[2] == a[3] == 0}, a, {n, 0, 20}] (* Eric W. Weisstein, Apr 11 2018 *)
  • PARI
    N = 66;  x = 'x + O('x^N);
    gf = sum(n=0,N, n!*(x*(1-x))^n/(1+x)^n );
    v = Vec(gf) /* Joerg Arndt, Apr 17 2013 */
    
  • Python
    from math import factorial, comb
    def A002464(n): return factorial(n)+sum((-1 if k&1 else 1)*factorial(n-k)*sum(comb(k-1,t-1)*comb(n-k,t)<Chai Wah Wu, Feb 19 2024

Formula

If n = 0 or 1 then a(n) = 1; if n = 2 or 3 then a(n) = 0; otherwise a(n) = (n+1)*a(n-1) - (n-2)*a(n-2) - (n-5)*a(n-3) + (n-3)*a(n-4).
G.f.: Sum_{n >= 0} n!*x^n*(1-x)^n/(1+x)^n. - Philippe Flajolet
G.f.: e^((1 + x)/((-1 + x) * x)) * (1 + x) * Gamma(0, (1 + x)/((-1 + x) * x))/((-1 + x) * x). - Eric W. Weisstein, May 16 2014
Let S_{n, k} = number of permutations of 12...n with exactly k rising or falling successions. Let S[n](t) = Sum_{k >= 0} S_{n, k}*t^k. Then S[0] = 1; S[1] = 1; S[2] = 2*t; S[3] = 4*t+2*t^2; for n >= 4, S[n] = (n+1-t)*S[n-1] - (1-t)*(n-2+3*t)*S[n-2] - (1-t)^2*(n-5+t)*S[n-3] + (1-t)^3*(n-3)*S[n-4].
a(n) = n! + Sum_{k=1..n} (-1)^k * Sum_{t=1..k} binomial(k-1,t-1) * binomial(n-k,t) * 2^t * (n-k)!. - Max Alekseyev, Jan 29 2006
a(n) = Sum_{k=0..n} (-1)^(n-k)*k!*b(n,k), where g.f. for b(n,k) is (1-x)/(1-(1+y)*x-y*x^2), cf. A035607. - Vladeta Jovovic, Nov 24 2007
Asymptotic (M. Abramson and W. Moser, 1966): a(n)/n! ~ (1 - 2/n^2 - 10/(3*n^3) - 6/n^4 - 154/(15*n^5) - 88/(9*n^6) + 5336/(105*n^7) + 1612/(3*n^8) + 2098234/(567*n^9) + 36500686/(1575*n^10) + ... )/e^2. - Vaclav Kotesovec, Apr 19 2011, extended Dec 27 2020
Conjecture: a(n) = Sum_{k=1..n} k!*A080246(n-1, k-1) for n > 0. - John Keith, Nov 02 2020
Proof: a(n) = Sum_{k=1..n} k!*A080246(n-1, k-1) for n > 0. Since a(n) = Sum_{k=0..n-1} (-1)^k*(n-k)!*Sum_{i=0..k} binomial(n-k,i)*binomial(n-1-i,k-i) (M. Abramson and W. Moser, 1966) which is Sum_{k=1..n} (-1)^(k-1)(n-k+1)!*Sum{i=0..k-1} binomial(n-k+1,i)*binomial(n-1-i,k-1-i) = Sum_{k=1..n} (-1)^(n-k)(k!)*Sum_{i=0..n-k} binomial(k,i)*binomial(n-1-i,n-k-i) = k!*A080246(n-1, k-1) as (-1)^(n-k) = (-1)^(n+k) and binomial(n-1-i,k-1) = binomial(n-1-i,n-k-i). - Alex McGaw, Apr 13 2023
a(n+2) = (n+2)! - Sum_{j=0..n} (-1)^j*(n+1-j)!*2*A104698(n, j), for n >= 0 (Abramson and Moser, p. 1250, (III), N_0(n+2), last line, rewritten). - Wolfdieter Lang, May 14 2025

Extensions

Merged with the old A001100, Aug 19 2003
Kaplansky reference from David Callan, Oct 29 2003
Tauraso reference from Parthasarathy Nambi, Dec 21 2006
Edited by Jon E. Schoenfield, Jan 31 2015

A113413 A Riordan array of coordination sequences.

Original entry on oeis.org

1, 2, 1, 2, 4, 1, 2, 8, 6, 1, 2, 12, 18, 8, 1, 2, 16, 38, 32, 10, 1, 2, 20, 66, 88, 50, 12, 1, 2, 24, 102, 192, 170, 72, 14, 1, 2, 28, 146, 360, 450, 292, 98, 16, 1, 2, 32, 198, 608, 1002, 912, 462, 128, 18, 1, 2, 36, 258, 952, 1970, 2364, 1666, 688, 162, 20, 1, 2, 40, 326
Offset: 0

Views

Author

Paul Barry, Oct 29 2005

Keywords

Comments

Columns include A040000, A008574, A005899, A008412, A008413, A008414. Row sums are A078057(n)=A001333(n+1). Diagonal sums are A001590(n+3). Reverse of A035607. Signed version is A080246. Inverse is A080245.
For another version see A122542. - Philippe Deléham, Oct 15 2006
T(n,k) is the number of length n words on alphabet {0,1,2} with no two consecutive 1's and no two consecutive 2's and having exactly k 0's. - Geoffrey Critzer, Jun 11 2015
From Eric W. Weisstein, Feb 17 2016: (Start)
Triangle of coefficients (from low to high degree) of x^-n * vertex cover polynomial of the n-ladder graph P_2 \square p_n:
Psi_{L_1}: x*(2 + x) -> {2, 1}
Psi_{L_2}: x^2*(2 + 4 x + x^2) -> {2, 4, 1}
Psi_{L_3}: x^3*(2 + 8 x + 6 x^2 + x^3) -> {2, 8, 6, 1}
(End)
Let c(n, k), n > 0, be multiplicative sequences for some fixed integer k >= 0 with c(p^e, k) = T(e+k, k) for prime p and e >= 0. Then we have Dirichlet g.f.: Sum_{n>0} c(n, k) / n^s = zeta(s)^(2*k+2) / zeta(2*s)^(k+1). Examples: For k = 0 see A034444 and for k = 1 see A322328. Dirichlet convolution of c(n, k) and lambda(n) is Dirichlet inverse of c(n, k). - Werner Schulte, Oct 31 2022

Examples

			Triangle begins
  1;
  2,  1;
  2,  4,  1;
  2,  8,  6,  1;
  2, 12, 18,  8,  1;
  2, 16, 38, 32, 10,  1;
  2, 20, 66, 88, 50, 12,  1;
		

Crossrefs

Other versions: A035607, A119800, A122542, A266213.

Programs

  • Mathematica
    nn = 10; Map[Select[#, # > 0 &] &, CoefficientList[Series[1/(1 - 2 x/(1 + x) - y x), {x, 0, nn}], {x, y}]] // Grid (* Geoffrey Critzer, Jun 11 2015 *)
    CoefficientList[CoefficientList[Series[1/(1 - 2 x/(1 + x) - y x), {x, 0, 10}, {y, 0, 10}], x], y] (* Eric W. Weisstein, Feb 17 2016 *)
  • Sage
    T = lambda n,k : binomial(n, k)*hypergeometric([-k-1, k-n], [-n], -1).simplify_hypergeometric()
    A113413 = lambda n,k : 1 if n==0 and k==0 else T(n, k)
    for n in (0..12): print([A113413(n,k) for k in (0..n)]) # Peter Luschny, Sep 17 2014 and Mar 16 2016
    
  • Sage
    # Alternatively:
    def A113413_row(n):
        @cached_function
        def prec(n, k):
            if k==n: return 1
            if k==0: return 0
            return prec(n-1,k-1)+2*sum(prec(n-i,k-1) for i in (2..n-k+1))
        return [prec(n, k) for k in (1..n)]
    for n in (1..10): print(A113413_row(n)) # Peter Luschny, Mar 16 2016

Formula

From Paul Barry, Nov 13 2005: (Start)
Riordan array ((1+x)/(1-x), x(1+x)/(1-x)).
T(n, k) = Sum_{i=0..n-k} C(k+1, i)*C(n-i, k).
T(n, k) = Sum_{j=0..n-k} C(k+j, j)*C(k+1, n-k-j).
T(n, k) = D(n, k) + D(n-1, k) where D(n, k) = Sum_{j=0..n-k} C(n-k, j)*C(k, j)*2^j = A008288(n, k).
T(n, k) = T(n-1, k) + T(n-1, k-1) + T(n-2, k-1).
T(n, k) = Sum_{j=0..n} C(floor((n+j)/2), k)*C(k, floor((n-j)/2)). (End)
T(n, k) = C(n, k)*hypergeometric([-k-1, k-n], [-n], -1). - Peter Luschny, Sep 17 2014
T(n, k) = (Sum_{i=2..k+2} A137513(k+2, i) * (n-k)^(i-2)) / (k!) for 0 <= k < n (conjectured). - Werner Schulte, Oct 31 2022

A090727 a(n) = 16a(n-1) - a(n-2), starting with a(0) = 2 and a(1) = 16.

Original entry on oeis.org

2, 16, 254, 4048, 64514, 1028176, 16386302, 261152656, 4162056194, 66331746448, 1057145886974, 16848002445136, 268510893235202, 4279326289318096, 68200709735854334, 1086932029484351248, 17322711762013765634, 276076456162735898896
Offset: 0

Views

Author

Nikolay V. Kosinov (kosinov(AT)unitron.com.ua), Jan 18 2004

Keywords

Comments

Numbers n such that (n^2-4)/7 is a square. - Colin Barker, Mar 17 2014

Crossrefs

Cf. A080246.

Programs

  • Mathematica
    a[0] = 2; a[1] = 16; a[n_] := 16a[n - 1] - a[n - 2]; Table[ a[n], {n, 0, 15}] (* Robert G. Wilson v, Jan 30 2004 *)
    LinearRecurrence[{16, -1}, {2, 16}, 20] (* T. D. Noe, Mar 17 2014 *)
  • Sage
    [lucas_number2(n,16,1) for n in range(0,20)] # Zerinvary Lajos, Jun 26 2008

Formula

a(n) = (8+sqrt(63))^n + (8-sqrt(63))^n.
a(n)^2 = a(2n) + 2.
G.f.: (2-16*x)/(1-16*x+x^2). - Philippe Deléham, Nov 02 2008
a(n) = 2 * A001081(n). - R. J. Mathar, Nov 30 2008

Extensions

More terms from Robert G. Wilson v, Jan 30 2004

A111806 Riordan array (1/(1+3x+2x^2),x/(1+3x+2x^2)).

Original entry on oeis.org

1, -3, 1, 7, -6, 1, -15, 23, -9, 1, 31, -72, 48, -12, 1, -63, 201, -198, 82, -15, 1, 127, -522, 699, -420, 125, -18, 1, -255, 1291, -2223, 1795, -765, 177, -21, 1, 511, -3084, 6562, -6768, 3840, -1260, 238, -24, 1, -1023, 7181, -18324, 23276, -16758, 7266, -1932, 308, -27, 1, 2047, -16398, 49029, -74616, 65870
Offset: 0

Views

Author

Paul Barry, Aug 18 2005

Keywords

Comments

Signed version of A110441. Factors as (1/(1+x),x/(1+x))*((1-x)/(1+x),x(1-x)/(1+x)), or inverse binomial transform of A080246. Inverse of little Schroeder number array A110440. Row sums are A108520. Diagonal sums are (-1)^n*A001906(n+1).

Examples

			Triangle starts
1;
-3,1;
7,-6,1;
-15,23,-9,1;
31,-72,48,-12,1;
		

Formula

T(n,k)=-3*T(n-1,k)+T(n-1,k-1)-2*T(n-2,k), T(0,0)=1, T(n,k)=0 if k<0 or if k>n. - Philippe Deléham, Jan 04 2013
Showing 1-5 of 5 results.