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 44 results. Next

A157011 Triangle T(n,k) read by rows: T(n,k)= (k-1)*T(n-1,k) + (n-k+2)*T(n-1, k-1), with T(n,1)=1, for 1 <= k <= n, n >= 1.

Original entry on oeis.org

1, 1, 2, 1, 5, 4, 1, 9, 23, 8, 1, 14, 82, 93, 16, 1, 20, 234, 607, 343, 32, 1, 27, 588, 2991, 3800, 1189, 64, 1, 35, 1365, 12501, 30155, 21145, 3951, 128, 1, 44, 3010, 47058, 195626, 256500, 108286, 12749, 256, 1, 54, 6416, 165254, 1111910, 2456256, 1932216, 522387, 40295, 512
Offset: 1

Views

Author

Roger L. Bagula, Feb 21 2009

Keywords

Comments

Row sums are apparently in A002627.
The Mathematica code gives ten sequences of which the first few are in the OEIS (see Crossrefs section). - G. C. Greubel, Feb 22 2019

Examples

			The triangle starts in row n=1 as:
  1;
  1,  2;
  1,  5,    4;
  1,  9,   23,      8;
  1, 14,   82,     93,      16;
  1, 20,  234,    607,     343,      32;
  1, 27,  588,   2991,    3800,    1189,      64;
  1, 35, 1365,  12501,   30155,   21145,    3951,    128;
  1, 44, 3010,  47058,  195626,  256500,  108286,  12749,   256;
  1, 54, 6416, 165254, 1111910, 2456256, 1932216, 522387, 40295, 512;
		

Crossrefs

Cf. A000096 (column k=1), A002627, A008517.
Cf. This sequence (m=0), A008292 (m=1), A157012 (m=2), A157013 (m=3).

Programs

  • Maple
    A157011 := proc(n,k) if k <0 or k >= n then 0; elif k  =0 then 1; else k*procname(n-1,k)+(n-k+1)*procname(n-1,k-1) ; end if; end proc: # R. J. Mathar, Jun 18 2011
  • Mathematica
    e[n_, 0, m_]:= 1;
    e[n_, k_, m_]:= 0 /; k >= n;
    e[n_, k_, m_]:= (k+m)*e[n-1, k, m] + (n-k+1-m)*e[n-1, k-1, m];
    Table[Flatten[Table[Table[e[n, k, m], {k,0,n-1}], {n,1,10}]], {m,0,10}]
    T[n_, 1]:= 1; T[n_, n_]:= 2^(n-1); T[n_, k_]:= T[n, k] = (k-1)*T[n-1, k] + (n-k+2)*T[n-1, k-1]; Table[T[n, k], {n, 1, 10}, {k, 1, n}]//Flatten (* G. C. Greubel, Feb 22 2019 *)
  • PARI
    {T(n, k) = if(k==1, 1, if(k==n, 2^(n-1), (k-1)*T(n-1, k) + (n-k+2)* T(n-1, k-1)))};
    for(n=1, 10, for(k=1, n, print1(T(n, k), ", "))) \\ G. C. Greubel, Feb 22 2019
    
  • Sage
    def T(n, k):
        if (k==1):
            return 1
        elif (k==n):
            return 2^(n-1)
        else: return (k-1)*T(n-1, k) + (n-k+2)* T(n-1, k-1)
    [[T(n, k) for k in (1..n)] for n in (1..10)] # G. C. Greubel, Feb 22 2019

A368769 a(n) = (n!)^3 * Sum_{k=1..n} 1/(k!)^3.

Original entry on oeis.org

0, 1, 9, 244, 15617, 1952126, 421659217, 144629111432, 74050105053185, 53982526583771866, 53982526583771866001, 71850742883000353647332, 124158083701824611102589697, 272775309892908670592389564310, 748495450346141392105516964466641
Offset: 0

Views

Author

Seiichi Manyama, Jan 04 2024

Keywords

Crossrefs

Programs

  • Mathematica
    Table[(n!)^3 Sum[1/(k!)^3,{k,n}],{n,0,20}] (* Harvey P. Dale, May 11 2025 *)
  • PARI
    a(n) = n!^3*sum(k=1, n, 1/k!^3);

Formula

a(0) = 0; a(n) = n^3 * a(n-1) + 1.
a(n) = A217284(n) - (n!)^3.
a(n) ~ (A271574 - 1) * (n!)^3. - Vaclav Kotesovec, Jan 05 2024

A181511 Triangle T(n,k) = n!/(n-k)! read by rows, 0 <= k < n.

Original entry on oeis.org

1, 1, 2, 1, 3, 6, 1, 4, 12, 24, 1, 5, 20, 60, 120, 1, 6, 30, 120, 360, 720, 1, 7, 42, 210, 840, 2520, 5040, 1, 8, 56, 336, 1680, 6720, 20160, 40320, 1, 9, 72, 504, 3024, 15120, 60480, 181440, 362880, 1, 10, 90, 720, 5040, 30240, 151200, 604800, 1814400, 3628800
Offset: 1

Views

Author

Alford Arnold, Oct 26 2010

Keywords

Comments

Row n contains the same set of values as row A181512(n,.), which are related to labeled rooted trees (A000169) and Bell numbers (A000110) respectively.

Examples

			The triangle begins:
  1;
  1,  2;
  1,  3,  6;
  1,  4, 12, 24;
which is A181512 without duplicates.
		

Crossrefs

Cf. A002627 (row sums).

Programs

  • Haskell
    a181511 n k = a181511_tabl !! (n-1) !! k
    a181511_row n = a181511_tabl !! (n-1)
    a181511_tabl = tail $ map init a008279_tabl
    -- Reinhard Zumkeller, Nov 18 2012
  • Maple
    A181511 := proc(n,k) n!/(n-k)! ; end proc:
    seq(seq(A181511(n,k),k=0..n-1),n=1..16) ; # R. J. Mathar, Mar 03 2011

Formula

T(n,k) = A008279(n,k). - R. J. Mathar, Mar 03 2011

A286282 Stage at which Ken Knowlton's elevator (version 2) reaches floor n for the first time.

Original entry on oeis.org

1, 2, 5, 18, 79, 408, 2469, 17314, 138555, 1247052, 12470593, 137176614, 1646119479, 21399553360, 299593747197, 4493906208138, 71902499330419, 1222342488617364, 22002164795112825, 418041131107143982, 8360822622142879983, 175577275065000480024, 3862700051430010560949
Offset: 1

Views

Author

N. J. A. Sloane, May 09 2017

Keywords

Comments

Indices of records in A286281.
Theorem: Let b(n) = Sum_{k=0..n} n!/k! = A000522(n). Then a(n) = 2*b(n-1)-n+2-2*(n-1)!. - R. L. Graham, May 10 2017
This implies the following recurrence (conjectured by N. J. A. Sloane on May 09 2017): a(1)=1, and for n>=1, a(n+1) = n*a(n) + n^2 - 3*n + 3. From the asymptotic expansion of b(n) (see A000522), we have a(n) ~ 2*(e-1)*(n-1)!.

Crossrefs

Programs

  • Maple
    A286282 := proc(n)
        2*A002627(n-1)-n+2 ;
    end proc:
    seq(A286282(n),n=1..21) ; # R. J. Mathar, May 21 2017
  • Mathematica
    f[n_, m_: 20] := Block[{a = {}, r = ConstantArray[0, m], f = 1, d = 0}, Do[AppendTo[a, f]; If[d == 1, r = MapAt[# + 1 &, r, f]]; If[Or[And[ Divisible[r[[f]], f], d == 1], f == 1], f++; d = 1, f--; d = -1], {i, n}]; a]; Rest@ Map[First, Values@ PositionIndex@ FoldList[Max, 0, f@ 200000]] - 1 (* Michael De Vlieger, May 10 2017, Version 10 *)
  • Python
    times = {1: 1, 2: 1, 3: 1, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1, 10: 1, 11: 1, 12: 1, 13: 1, 14: 1, 15: 1, 16: 1}
    first = {1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, 14: 0, 15: 0, 16: 0}
    floor = 1
    steps = 1
    while floor < 17:
        if first[floor] == 0:
            first[floor] = 1
            print("First Time: ",floor,steps)
        if floor == 1:
            floor += 1
        else:
            if times[floor] < floor:
                times[floor] += 1
                floor -= 1
            else:
                times[floor] = 0
                floor += 1
        steps += 1
    print(floor, steps)
    # David Consiglio, Jr., May 09 2017

Formula

a(n) = 2*A002627(n-1) - (n-2). - N. J. A. Sloane, May 15 2017
Conjecture: a(n) +(-n-2)*a(n-1) +3*(n-1)*a(n-2) +(-3*n+8)*a(n-3) +(n-4)*a(n-4)=0. - R. J. Mathar, May 21 2017
Conjecture: (n+1)*a(n) +(-n^2+3*n-27)*a(n-1) +3*(-n^2+10*n-13)*a(n-2) +(n-3)*(4*n-17)*a(n-3)=0. - R. J. Mathar, May 21 2017

Extensions

a(10)-a(13) from David Consiglio, Jr., May 09 2017
Further terms added by N. J. A. Sloane, May 10 2017 based on R. L. Graham's formula.

A056541 a(n) = 2n*a(n-1) + 1 with a(0)=0.

Original entry on oeis.org

0, 1, 5, 31, 249, 2491, 29893, 418503, 6696049, 120528883, 2410577661, 53032708543, 1272785005033, 33092410130859, 926587483664053, 27797624509921591, 889523984317490913, 30243815466794691043
Offset: 0

Views

Author

Henry Bottomley, Jun 20 2000

Keywords

Comments

if s(n) is a sequence defined as s(0)=x, s(n) = 2n*s(n-1)+k, n>0, then s(n) = 2^n*n!*x + a(n)*k. - Gary Detlefs, Feb 20 2010

Examples

			a(3) = 2*3*a(2)+1 = 6*5+1 = 31.
		

Crossrefs

Programs

  • Mathematica
    nxt[{n_,a_}]:={n+1,2a(n+1)+1}; NestList[nxt,{0,0},20][[All,2]] (* or *) With[{nn=20},CoefficientList[Series[(Exp[x]-1)/(1-2x),{x,0,nn}],x] Range[ 0,nn]!] (* Harvey P. Dale, Aug 08 2021 *)

Formula

a(n) = floor[(sqrt(e)-1)*2^n*n! ] = A010844(n)-A000165(n).
a(n) = Sum[P(n, k) * 2^k {k=0 to n-1}] - Ross La Haye, Sep 15 2004
Conjecture: a(n) +(-2*n-1)*a(n-1) +2*(n-1)*a(n-2)=0. - R. J. Mathar, May 29 2013
E.g.f.: (exp(x)-1)/(1-2*x) = -12*x/(Q(0)+6*x-3*x^2)/(1-2*x), where Q(k) = 2*(4*k+1)*(32*k^2+16*k+x^2-6) - x^4*(4*k-1)*(4*k+7)/Q(k+1) ; (continued fraction). - Sergei N. Gladkovskii, Nov 18 2013

Extensions

More terms from James Sellers, Jul 04 2000

A056543 a(n) = n*a(n-1) - 1 with a(1)=1.

Original entry on oeis.org

1, 1, 2, 7, 34, 203, 1420, 11359, 102230, 1022299, 11245288, 134943455, 1754264914, 24559708795, 368395631924, 5894330110783, 100203611883310, 1803665013899579, 34269635264092000, 685392705281839999, 14393246810918639978, 316651429840210079515, 7282982886324831828844
Offset: 1

Views

Author

Henry Bottomley, Jun 20 2000

Keywords

Comments

If s(n) is a sequence defined by s(0)=x, s(n)=(n+1)*s(n-1)+k, n>0, then s(n) = n!*x +(n! - a(n+1))*k. - Gary Detlefs, Jun 10 2010

Examples

			a(4) = 4*a(3) - 1 = 4*2 - 1 = 7.
		

Programs

  • Mathematica
    nxt[{n_,a_}]:={n+1,a(n+1)-1}; NestList[nxt,{1,1},30][[All,2]] (* Harvey P. Dale, Dec 31 2022 *)

Formula

a(n) = ceiling((3-e)*n!) = n! - A056542(n) = 2*n! - A002627(n) = 3*n! - A000522(n).

Extensions

More terms from James Sellers, Jul 04 2000

A061573 a(n) = (n!)^2*Sum_{k=1..n} 1/k!.

Original entry on oeis.org

1, 6, 60, 984, 24720, 890640, 43646400, 2793409920, 226266566400, 22626660268800, 2737825932441600, 394246934750592000, 66627731979077068800, 13059035467986283776000, 2938282980298221523968000, 752200442956365632925696000, 217385928014390023602954240000
Offset: 1

Views

Author

N. J. A. Sloane, May 19 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Table[(n!)^2 Sum[1/k!,{k,n}],{n,20}] (* Harvey P. Dale, Dec 02 2021 *)
  • PARI
    a(n) = { n!^2*sum(k=1, n, 1/k!) } \\ Harry J. Smith, Jul 24 2009

Formula

Recurrence: a(1) = 1, a(2) = 6, a(n) = n*(n+1)*a(n-1) - n*(n-1)^2*a(n-2) for n >=3. The sequence b(n) = n!^2 also satisfies this recurrence with the initial conditions b(1) = 1 and b(2) = 4. Hence we have the finite continued fraction expansion a(n)/b(n) = 1/(1-2/(6-12/(12-...-n*(n-1)^2/(n*(n+1))))). Lim_{n -> infinity} a(n)/b(n) = e - 1 = 1/(1-2/(6-12/(12-...-n*(n-1)^2/(n*(n+1))-...))) = 1/(1-1/(3-2/(4-...-n/(n+2)-...))). Cf. A000522 and A061572. - Peter Bala, Jul 10 2008
a(n) = n!*A002627(n). - R. J. Mathar, Mar 18 2017
Sum_{n>=1} a(n) * x^n / (n!)^2 = (exp(x) - 1) / (1 - x). - Ilya Gutkovskiy, Jul 15 2021

A193668 a(n) = Sum_{i=0..n-1} (n+i)*a(n-1-i) for n>1, a(0)=1, a(1)=1.

Original entry on oeis.org

1, 1, 5, 24, 134, 866, 6392, 53198, 493628, 5057522, 56741240, 692118422, 9122245508, 129220379978, 1958059133552, 31607140330670, 541515698082332, 9814691158604258, 187629572002767848, 3773371262361852422, 79636835475910932020
Offset: 0

Views

Author

Clark Kimberling, Aug 02 2011

Keywords

Comments

Occurs in making the Q-residue A193657.
Second difference of A002627. - Peter Luschny, May 30 2014

Crossrefs

Programs

  • Maple
    a := n -> `if`(n=0,1,(n-n^2-1)*GAMMA(n)+exp(1)*((1-n)*GAMMA(n,1) + n*GAMMA(n+1, 1))): seq(simplify(a(n)),n=0..20); # Peter Luschny, May 30 2014
  • Mathematica
    (See A193657.)
    Flatten[{1,RecurrenceTable[{(n-2)*a[n-2] - (n+2)*a[n-1] + a[n] == 0, a[1]==1, a[2]==5}, a, {n, 20}]}] (* Vaclav Kotesovec, Nov 20 2012 *)
    CoefficientList[Series[Log[x-1]+E*Gamma[0,1-x]-E*Gamma[0,1]+1-I*Pi+(E^x*x-x^2)/(x-1)^2, {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec, Nov 20 2012 *)
  • PARI
    a(n)=if(n<2,1,sum(i=0,n-1,(n+i)*a(n-1-i))) \\ Charles R Greathouse IV, May 30 2014

Formula

Recurrence: a(n) = (n+2)*a(n-1) - (n-2)*a(n-2). - Vaclav Kotesovec, Nov 20 2012
a(n) ~ n!*n*(e-1). - Vaclav Kotesovec, Nov 20 2012
a(n) = (n-n^2-1)*Gamma(n) + e*(n*Gamma(n+1,1)-(n-1)*Gamma(n,1)) for n>0. - Peter Luschny, May 30 2014.

A361557 Expansion of e.g.f. exp((exp(x) - 1)/(1-x)).

Original entry on oeis.org

1, 1, 4, 20, 127, 977, 8789, 90267, 1040260, 13275258, 185653535, 2821321725, 46265262553, 813871304989, 15281792484768, 304949014412540, 6442741397501699, 143633948442619765, 3369004776395733829, 82919378806522132407, 2136425765494805888952
Offset: 0

Views

Author

Seiichi Manyama, Mar 15 2023

Keywords

Crossrefs

Programs

  • PARI
    my(N=30, x='x+O('x^N)); Vec(serlaplace(exp((exp(x)-1)/(1-x))))

Formula

a(0) = 1; a(n) = Sum_{k=1..n} A002627(k) * binomial(n-1,k-1) * a(n-k).

A230071 Sum over all permutations without double ascents on n elements and each permutation contributes 2 raised to the power of the number of double descents.

Original entry on oeis.org

0, 0, 2, 6, 26, 130, 782, 5474, 43794, 394146, 3941462, 43356082, 520272986, 6763548818, 94689683454, 1420345251810, 22725524028962, 386333908492354, 6954010352862374, 132126196704385106, 2642523934087702122, 55493002615841744562, 1220846057548518380366
Offset: 0

Views

Author

Richard Ehrenborg, Oct 08 2013

Keywords

Examples

			For n=3 the a(3)= 6 since the 4 permutations 132, 213, 231, 312 all contribute 1 and 321 contributes 2 to the sum. Note when n=4, the permutation 4321 contributes 4 since it has two double descents.
G.f. = 2*x^2 + 6*x^3 + 26*x^4 + 130*x^5 + 782*x^6 + 5474*x^7 + 43794*x^8 + ...
		

Crossrefs

Programs

  • Maple
    a := proc(n) if n < 2 then 0 elif n = 2 then 2 else (2-n)*a(n-3)+a(n-2)+n*a(n-1) fi end: seq(a(n), n=0..9); # Peter Luschny, May 30 2014
  • Mathematica
    a[0] = 0; a[n_] := a[n] = n a[n-1] + (-1)^n + 1;
    Array[a, 23, 0] (* Jean-François Alcover, Jul 08 2019, after A080227 *)

Formula

E.g.f.: (exp(x)+exp(-x)-2)/(1-x).
a(n) = closest integer to (e-2+1/e)*n! for n > 3.
a(n) = (2-n)*a(n-3) + a(n-2) + n*a(n-1) for n > 2.
a(n) = 2*A080227(n).
a(n) = sum(0<=kA002627(k)). - Peter Luschny, May 30 2014
0 = a(n)*(+a(n+1) - a(n+2) - 3*a(n+3) + a(n+4)) + a(n+1)*(+a(n+1) + a(n+2) - 2*a(n+3)) + a(n+2)*(+a(n+2) + a(n+3) - a(n+4)) + a(n+3)*(+a(n+3)) if n>=0. - Michael Somos, May 30 2014

Extensions

a(0) and a(1) prepended, partially edited. - Peter Luschny, May 30 2014
Previous Showing 21-30 of 44 results. Next