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

A040027 The Gould numbers.

Original entry on oeis.org

1, 1, 3, 9, 31, 121, 523, 2469, 12611, 69161, 404663, 2512769, 16485691, 113842301, 824723643, 6249805129, 49416246911, 406754704841, 3478340425563, 30845565317189, 283187362333331, 2687568043654521, 26329932233283223, 265946395403810289, 2766211109503317451
Offset: 0

Views

Author

Keywords

Comments

Number of permutations beginning with 21 and avoiding 1-23. - Ralf Stephan, Apr 25 2004
Originally defined as main diagonal of an array of binomial recurrence coefficients (see Gould and Quaintance). Also second-from-right diagonal of triangle A121207.
Starting (1, 3, 9, 31, 121, ...) = row sums of triangle A153868. - Gary W. Adamson, Jan 03 2009
Equals eigensequence of triangle A074909 (reflected). - Gary W. Adamson, Apr 10 2009
The divergent series g(x=1,m) = 1^m*1! - 2^m*2! + 3^m*3! - 4^m*4! + ..., m=>-1, is related to the sequence given above. For m=-1 this series dates back to Euler. We discovered that g(x=1,m) = (-1)^m * (A040027(m) - A000110(m+1) * A073003) with A073003 Gompertz's constant and A000110 the Bell numbers, see A163940; A040027(m = -1) = 0. - Johannes W. Meijer, Oct 16 2009
Compare the o.g.f. to the o.g.f. B(x) of the Bell numbers, where B(x) = 1 + x*B(x/(1-x))/(1-x). - Paul D. Hanna, Mar 23 2012
a(n) is the number of set partitions of {1,2,...,n+1} in which the last block is a singleton: the blocks are arranged in order of their least element. An example is given below. - Peter Bala, Dec 17 2014

Examples

			a(3) = 9: Arranging the blocks of the 15 set partitions of {1,2,3,4} in order of their least element we find 9 set partitions for which the last block is a singleton, namely, 123|4, 124|3, 134|2, 1|24|3, 1|23|4, 12|3|4, 13|2|4, 14|2|3, and 1|2|3|4. - _Peter Bala_, Dec 17 2014
		

Crossrefs

Left-hand border of triangle A046936. Cf. also A011971, A014619, A298804.
Cf. A153868. - Gary W. Adamson, Jan 03 2009
Cf. A074909. - Gary W. Adamson, Apr 10 2009
Row sums of A163940. - Johannes W. Meijer, Oct 16 2009
Cf. A108458 (row sums), A124496 (column 1).

Programs

  • Haskell
    a040027 n = head $ a046936_row (n + 1)  -- Reinhard Zumkeller, Jan 01 2014
    
  • Maple
    A040027 := proc(n)
        option remember;
        if n = 0 then
            1;
        else
            add(binomial(n,k-1)*procname(n-k),k=1..n) ;
        end if;
    end proc: # Johannes W. Meijer, Oct 16 2009
  • Mathematica
    a[0] = a[1] = 1; a[n_] := a[n] = Sum[Binomial[n, k + 1]*a[k], {k, 0, n - 1}]; Table[a[n], {n, 0, 22}]  (* Jean-François Alcover, Jul 02 2013 *)
    Rest[CoefficientList[Assuming[Element[x, Reals], Series[E^E^x*(ExpIntegralEi[-E^x] - ExpIntegralEi[-1]), {x, 0, 20}]], x] * Range[0, 20]!] (* Vaclav Kotesovec, Feb 28 2014 *)
  • PARI
    {a(n)=local(A=1+x);for(i=1,n,A=1+x*subst(A,x,x/(1-x+x*O(x^n)))/(1-x)^2);polcoeff(A,n)} /* Paul D. Hanna, Mar 23 2012 */
    
  • Python
    # The function Gould_diag is defined in A121207.
    A040027_list = lambda size: Gould_diag(2, size)
    print(A040027_list(24)) # Peter Luschny, Apr 24 2016

Formula

a(n) = b(n-2), n>1, b(n) = Sum_{k = 1..n} binomial(n, k-1)*b(n-k), b(0) = 1. - Vladeta Jovovic, Apr 28 2001
E.g.f. satisfies A'(x) = exp(x)*A(x)+1. - N. J. A. Sloane
With offset 0, e.g.f.: x + exp(exp(x)) * Integral_{t=0..x} t*exp(-exp(t)+t) dt (fits the recurrence up to n=215). - Ralf Stephan, Apr 25 2004
Recurrence: a(0)=1, a(1)=1, for n > 1, a(n) = n + Sum_{j=1..n-1} binomial(n, j+1)*a(j). - Jon Perry, Apr 26 2005
O.g.f. satisfies: A(x) = 1 + x*A( x/(1-x) ) / (1-x)^2. - Paul D. Hanna, Mar 23 2012
From Peter Bala, Dec 17 2014: (Start)
Starting from A(x) = 1 + O(x) (big Oh notation) we can get a series expansion for the o.g.f. by repeatedly applying the above functional equation of Hanna: A(x) = 1 + O(x) = 1 + x/(1-x)^2 + O(x^2) = 1 + x/(1-x)^2 + x^2/((1-x)*(1-2*x)^2) + O(x^3) = ... = 1 + x/(1-x)^2 + x^2/((1-x)*(1-2*x)^2) + x^3/((1-x)*(1-2*x)*(1-3*x)^2) + x^4/((1-x)*(1-2*x)*(1-3*x)*(1-4*x)^2) + ....
a(n) = Sum_{k = 0..n} ( Sum_{j = k..n} Stirling2(j,k)*k^(n-j) ).
Row sums of A108458. First column of A124496. (End)
Conjecture: a(n) = Sum_{k = 0..n} A058006(k)*A048993(n+1, k+1) - Velin Yanev, Aug 31 2021

Extensions

Entry revised by N. J. A. Sloane, Dec 11 2006
Gould reference updated by Johannes W. Meijer, Aug 02 2009
Don Knuth, Jan 29 2018, suggested that this sequence should be named after H. W. Gould. - N. J. A. Sloane, Jan 30 2018

A121207 Triangle read by rows. The definition is by diagonals. The r-th diagonal from the right, for r >= 0, is given by b(0) = b(1) = 1; b(n+1) = Sum_{k=0..n} binomial(n+2,k+r)*a(k).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 3, 5, 1, 1, 4, 9, 15, 1, 1, 5, 14, 31, 52, 1, 1, 6, 20, 54, 121, 203, 1, 1, 7, 27, 85, 233, 523, 877, 1, 1, 8, 35, 125, 400, 1101, 2469, 4140, 1, 1, 9, 44, 175, 635, 2046, 5625, 12611, 21147, 1, 1, 10, 54, 236, 952, 3488, 11226, 30846, 69161, 115975
Offset: 0

Views

Author

N. J. A. Sloane, based on email from R. J. Mathar, Dec 11 2006

Keywords

Comments

From Paul D. Hanna, Dec 12 2006: (Start)
Consider the row reversal, which is A124496 with an additional left column (A000110 = Bell numbers). The matrix inverse of this triangle is very simple:
1;
-1, 1;
-1, -1, 1;
-1, -2, -1, 1;
-1, -3, -3, -1, 1;
-1, -4, -6, -4, -1, 1;
-1, -5, -10, -10, -5, -1, 1;
-1, -6, -15, -20, -15, -6, -1, 1;
-1, -7, -21, -35, -35, -21, -7, -1, 1;
-1, -8, -28, -56, -70, -56, -28, -8, -1, 1; ...
This gives the recurrence and explains why the Bell numbers appear. (End)
Triangle A160185 = reversal then deletes right border of 1's. - Gary W. Adamson, May 03 2009

Examples

			Triangle begins (compare also table 9.2 in the Gould-Quaintance reference):
  1;
  1, 1;
  1, 1,  2;
  1, 1,  3,  5;
  1, 1,  4,  9,  15;
  1, 1,  5, 14,  31, 52;
  1, 1,  6, 20,  54, 121, 203;
  1, 1,  7, 27,  85, 233, 523,  877;
  1, 1,  8, 35, 125, 400,1101, 2469,  4140;
  1, 1,  9, 44, 175, 635,2046, 5625, 12611, 21147;
  1, 1, 10, 54, 236, 952,3488,11226, 30846, 69161, 115975;
  1, 1, 11, 65, 309,1366,5579,20425, 65676,180474, 404663, 678570;
  1, 1, 12, 77, 395,1893,8494,34685,126817,407787,1120666,2512769,4213597;
		

Crossrefs

Diagonals, reading from the right, are A000110, A040027, A045501, A045499, A045500.
A124496 is a very similar triangle, obtained by reversing the rows and appending a rightmost diagonal which is A000110, the Bell numbers. See also A046936, A298804, A186020, A160185.
T(2n,n) gives A297924.

Programs

  • Julia
    function Gould_diag(diag, size)
        size < 1 && return []
        size == 1 && return [1]
        L = [1, 1]
        accu = ones(BigInt, diag)
        for _ in 1:size-2
            accu = cumsum(vcat(accu[end], accu))
            L = vcat(L, accu[end])
        end
    L end # Peter Luschny, Mar 30 2022
  • Maple
    # This is the Jovovic formula with general index 'd'
    # where A040027, A045499, etc. use one explicit integer
    # Index n+1 is shifted to n from the original formula.
    Gould := proc(n, d) local k;
        if n <= 1 then return 1 else
        return add(binomial(n-1+d, k+d)*Gould(k, d), k=0..n-1);
        fi
    end:
    # row and col refer to the extrapolated super-table:
    # working up to row, not row-1, shows also the Bell numbers
    # at the end of each row.
    for row from 0 to 13 do
        for col from 0 to row do
           # 'diag' is constant for one of A040027, A045499 etc.
           diag := row - col;
           printf("%4d, ", Gould(col, diag));
        od;
        print();
    od; # R. J. Mathar
    # second Maple program:
    T:= proc(n, k) option remember; `if`(k=0, 1,
          add(T(n-j, k-j)*binomial(n-1, j-1), j=1..k))
        end:
    seq(seq(T(n, k), k=0..n), n=0..12);  # Alois P. Heinz, Jan 08 2018
  • Mathematica
    g[n_ /; n <= 1, ] := 1; g[n, d_] := g[n, d] = Sum[ Binomial[n-1+d, k+d]*g[k, d], {k, 0, n-1}]; Flatten[ Table[ diag = row-col; g[col, diag], {row, 0, 13}, {col, 0, row}]] (* Jean-François Alcover, Nov 25 2011, after R. J. Mathar *)
    T[n_, k_] := T[n, k] = If[k == 0, 1, Sum[T[n-j, k-j] Binomial[n-1, j-1], {j, 1, k}]]; Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jul 26 2018, after Alois P. Heinz *)
  • Python
    # Computes the n-th diagonal of the triangle reading from the right.
    from itertools import accumulate
    def Gould_diag(diag, size):
        if size < 1: return []
        if size == 1: return [1]
        L, accu = [1,1], [1]*diag
        for _ in range(size-2):
            accu = list(accumulate([accu[-1]] + accu))
            L.append(accu[-1])
        return L # Peter Luschny, Apr 24 2016
    

A046936 Same rule as Aitken triangle (A011971) except a(0,0)=0, a(1,0)=1.

Original entry on oeis.org

0, 1, 1, 1, 2, 3, 3, 4, 6, 9, 9, 12, 16, 22, 31, 31, 40, 52, 68, 90, 121, 121, 152, 192, 244, 312, 402, 523, 523, 644, 796, 988, 1232, 1544, 1946, 2469, 2469, 2992, 3636, 4432, 5420, 6652, 8196, 10142, 12611, 12611, 15080, 18072, 21708, 26140
Offset: 0

Views

Author

Keywords

Examples

			Triangle starts:
0,
1, 1,
1, 2, 3,
3, 4, 6, 9,
9, 12, 16, 22, 31,
31, 40, 52, 68, 90, 121,
121, 152, 192, 244, 312, 402, 523,
523, 644, 796, 988, 1232, 1544, 1946, 2469,
2469, 2992, 3636, 4432, 5420, 6652, 8196, 10142, 12611,
12611, 15080, ...
		

Crossrefs

Borders give A040027. Reading across rows gives A007604.

Programs

  • Haskell
    a046936 n k = a046936_tabl !! n !! k
    a046936_row n = a046936_tabl !! n
    a046936_tabl = [0] : iterate (\row -> scanl (+) (last row) row) [1,1]
    -- Reinhard Zumkeller, Jan 01 2014
    
  • Mathematica
    a[0, 0] = 0; a[1, 0] = 1; a[n_, 0] := a[n, 0] = a[n-1, n-1]; a[n_, k_] := a[n, k] = a[n, k-1] + a[n-1, k-1]; Table[a[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Jean-François Alcover, Nov 15 2013 *)
  • Python
    from itertools import accumulate
    def A046936(): # Compare function Gould_diag in A121207.
        yield [0]
        accu = [1, 1]
        while True:
            yield accu
            accu = list(accumulate([accu[-1]] + accu))
    g = A046936()
    [next(g) for  in range(9)] # _Peter Luschny, Apr 25 2016

A289803 p-INVERT of the even bisection (A001906) of the Fibonacci numbers, where p(S) = 1 - S - S^2.

Original entry on oeis.org

1, 5, 23, 103, 456, 2009, 8833, 38803, 170399, 748176, 3284833, 14421533, 63314735, 277968871, 1220356440, 5357681369, 23521603225, 103265890987, 453363808127, 1990383615264, 8738295434881, 38363361811637, 168425013526727, 739429075564711, 3246283590352104
Offset: 0

Views

Author

Clark Kimberling, Aug 12 2017

Keywords

Comments

Suppose s = (c(0), c(1), c(2), ...) is a sequence and p(S) is a polynomial. Let S(x) = c(0)*x + c(1)*x^2 + c(2)*x^3 + ... and T(x) = (-p(0) + 1/p(S(x)))/x. The p-INVERT of s is the sequence t(s) of coefficients in the Maclaurin series for T(x). Taking p(S) = 1 - S gives the "INVERT" transform of s, so that p-INVERT is a generalization of the "INVERT" transform (e.g., A033453).
See A289780 for a guide to related sequences.

Crossrefs

Programs

  • Mathematica
    z = 60; s = x/(1 - 3*x + x^2); p = 1 - s - s^2;
    Drop[CoefficientList[Series[s, {x, 0, z}], x], 1] (* A001906 *)
    Drop[CoefficientList[Series[1/p, {x, 0, z}], x], 1] (* A289803 *)

Formula

G.f.: (1 - 2 x + x^2)/(1 - 7 x + 13 x^2 - 7 x^3 + x^4).
a(n) = 7*a(n-1) - 13*a(n-2) + 7*a(n-3) - a(n-4).
Showing 1-4 of 4 results.