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.

A007489 a(n) = Sum_{k=1..n} k!.

Original entry on oeis.org

0, 1, 3, 9, 33, 153, 873, 5913, 46233, 409113, 4037913, 43954713, 522956313, 6749977113, 93928268313, 1401602636313, 22324392524313, 378011820620313, 6780385526348313, 128425485935180313, 2561327494111820313, 53652269665821260313, 1177652997443428940313
Offset: 0

Views

Author

Keywords

Comments

Equals row sums of triangle A143122 starting (1, 3, 9, 33, ...). - Gary W. Adamson, Jul 26 2008
a(n) for n>=4 is never a perfect square. - Alexander R. Povolotsky, Oct 16 2008
Number of cycles that can be written in the form (j,j+1,j+2,...), in all permutations of {1,2,...,n}. Example: a(3)=9 because in (1)(2)(3), (1)(23), (12)(3), (13)(2), (123), (132) we have 3+2+2+1+1+0=9 such cycles. - Emeric Deutsch, Jul 14 2009
Conjectured to be the length of the shortest word over {1,...,n} that contains each of the n! permutations as a factor (cf. A180632) [see Johnston]. - N. J. A. Sloane, May 25 2013
The above conjecture has been disproven for n>=6. See A180632 and the Houston 2014 reference. - Dmitry Kamenetsky, Mar 07 2016
a(n) is also the number of compositions of n if cardinal values do not matter but ordinal rankings do. Since cardinal values do not matter, a sequence of k summands summing to n can be represented as (s(1),...,s(k)), where the s's are positive integers and the numbers in parentheses are the initial ordinal rankings. The number of compositions of these summands are equal to k!, with k ranging from 1 to n. - Gregory L. Simay, Jul 31 2016
When the numbers denote finite permutations (as row numbers of A055089) these are the circular shifts to the left. Compare array A211370 for circular shifts to the left in a broader sense. Compare sequence A001563 for circular shifts to the right. - Tilman Piesk, Apr 29 2017
Since a(n) = (1!+2!+3!+...+n!) = 3(1+3!/3+4!/3+...+n!/3) is a multiple of 3 for n>2, the only prime in this sequence is a(2) = 3. - Eric W. Weisstein, Jul 15 2017
Generalization of 2nd comment: a(n) for n>=4 is never a perfect power (A007916) (Chentzov link). - Bernard Schott, Jan 26 2023

Examples

			a(4) = 1! + 2! + 3! + 4! = 1 + 2 + 6 + 24 = 33. - _Michael B. Porter_, Aug 03 2016
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, 3rd ed., Section B44, Springer 2010.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Equals A003422(n+1) - 1.
Column k=0 of A120695.

Programs

Formula

a(n) = Sum_{k=1..n} P(n, k)/C(n, k). - Ross La Haye, Sep 21 2004
a(n) = 3*A056199(n) for n>=2. - Philippe Deléham, Feb 10 2007
a(n) = !(n+1)-1=A003422(n+1)-1. - Artur Jasinski, Nov 08 2007 [corrected by Werner Schulte, Oct 20 2021]
Starting (1, 3, 9, 33, 153, ...), = row sums of triangle A137593 - Gary W. Adamson, Jan 28 2008
a(n) = a(n-1) + n! for n >= 1. - Jaroslav Krizek, Jun 16 2009
E.g.f. A(x) satisfies to the differential equation A'(x)=A(x)+x/(1-x)^2+1. - Vladimir Kruchinin, Jan 22 2011
a(0)=0, a(1)=1, a(n) = (n+1)*a(n-1)-n*a(n-2). - Sergei N. Gladkovskii, Jul 05 2012
G.f.: W(0)*x/(2-2*x) , where W(k) = 1 + 1/( 1 - x*(k+2)/( x*(k+2) + 1/W(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 19 2013
G.f.: x /(1-x)/Q(0),m=+2, where Q(k) = 1 - 2*x*(2*k+1) - m*x^2*(k+1)*(2*k+1)/( 1 - 2*x*(2*k+2) - m*x^2*(k+1)*(2*k+3)/Q(k+1) ) ; (continued fraction). - Sergei N. Gladkovskii, Sep 24 2013
E.g.f.: exp(x-1)*(Ei(1) - Ei(1-x)) - exp(x) + 1/(1 - x), where Ei(x) is the exponential integral. - Ilya Gutkovskiy, Nov 27 2016
a(n) = sqrt(a(n-1)*a(n+1)-a(n-2)*n*n!), n >= 2. - Gary Detlefs, Oct 26 2020
a(n) ~ n!. - Ridouane Oudra, Jun 11 2025

A117396 Triangle, read by rows, defined by: T(n,k) = (k+1)*T(n,k+1) - Sum_{j=1..n-k-1} T(j,0)*T(n,j+k+1) for n>k with T(n,n)=1 for n>=0.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 5, 3, 1, 1, 17, 11, 4, 1, 1, 77, 51, 19, 5, 1, 1, 437, 291, 109, 29, 6, 1, 1, 2957, 1971, 739, 197, 41, 7, 1, 1, 23117, 15411, 5779, 1541, 321, 55, 8, 1, 1, 204557, 136371, 51139, 13637, 2841, 487, 71, 9, 1, 1, 2018957, 1345971, 504739, 134597, 28041, 4807, 701, 89, 10, 1
Offset: 0

Views

Author

Paul D. Hanna, Mar 11 2006

Keywords

Comments

Columns equal the partial sums of columns of triangle A092582 for k>0: T(n, k) - T(n-1, k) = A092582(n,k) = number of permutations p of [n] having length of first run equal to k.

Examples

			Triangle begins:
  1;
  1,      1;
  1,      2,      1;
  1,      5,      3,     1;
  1,     17,     11,     4,     1;
  1,     77,     51,    19,     5,    1;
  1,    437,    291,   109,    29,    6,   1;
  1,   2957,   1971,   739,   197,   41,   7,  1;
  1,  23117,  15411,  5779,  1541,  321,  55,  8, 1;
  1, 204557, 136371, 51139, 13637, 2841, 487, 71, 9, 1; ...
Matrix inverse is:
   1;
  -1,  1;
   1, -2,  1;
   1,  1, -3,  1;
   1,  1,  1, -4,  1;
   1,  1,  1,  1, -5, 1; ...
Matrix log is the integer triangle A117398:
    0;
    1,  0;
    0,  2,  0;
   -1,  2,  3,  0;
   -3,  4,  5,  4,  0;
   -9, 14, 15,  9,  5,  0;
  -33, 68, 65, 34, 14,  6,  0; ...
		

Crossrefs

Cf. A014288 (column 1), A056199 (column 2), A117397 (column 3), A003422 (row sums), A117398 (matrix log); A092582.

Programs

  • Magma
    [k eq 0 select 1 else k*(&+[Factorial(j)/Factorial(k+1): j in [k-1..n]]): k in [0..n], n in [0..12]]; // G. C. Greubel, Sep 24 2021
    
  • Mathematica
    T[n_, k_]:= T[n, k]= If[k==0, 1, k*Sum[j!/(k+1)!, {j,k-1,n}]];
    Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Sep 24 2021 *)
  • PARI
    T(n,k)=if(n
    				
  • PARI
    /* Definition by Matrix Inverse: */ T(n,k)=local(M=matrix(n+1,n+1,r,c,if(r>=c,if(r==c+1,-c,1))));(M^-1)[n+1,k+1]
    
  • PARI
    T(n,k)=if(nPaul D. Hanna, Jun 20 2006
    
  • Sage
    def A117396(n,k): return 1 if (k==0) else k*sum(factorial(j)/factorial(k+1) for j in (k-1..n))
    flatten([[A117396(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Sep 24 2021

Formula

T(n,k) = k*Sum_{j=k-1..n} j!/(k+1)! for n >= k > 0, with T(n,0) = 1 for n >= 0. - Paul D. Hanna, Jun 20 2006

A117397 Column 3 of triangle A117396.

Original entry on oeis.org

1, 4, 19, 109, 739, 5779, 51139, 504739, 5494339, 65369539, 843747139, 11741033539, 175200329539, 2790549065539, 47251477577539, 847548190793539, 16053185741897539, 320165936763977539, 6706533708227657539, 147206624680428617539, 3378708717041050697539
Offset: 0

Views

Author

Paul D. Hanna, Mar 11 2006

Keywords

Comments

Equals the partial sums of column 3 of triangle A092582.

Examples

			G.f.: A(x) = 1 + 4*x + 19*x^2 + 109*x^3 + 739*x^4 + 5779*x^5 + 51139*x^6 + 504739*x^7 + 5494339*x^8 + 65369539*x^9 + 843747139*x^10 + ...
		

Crossrefs

Cf. A117396 (triangle), A014288 (column 1), A056199 (column 2), A003422 (row sums).

Programs

  • Magma
    [(&+[Factorial(j): j in [2..n+3]])/8: n in [0..30]]; // G. C. Greubel, Sep 05 2022
    
  • Maple
    a:=n->sum(j!/8,j=2..n): seq(a(n), n=3..21); # Zerinvary Lajos, Jan 08 2007
  • Mathematica
    Table[Sum[i!/8, {i, 2, n}], {n, 3, 21}] (* Zerinvary Lajos, Jul 12 2009 *)
  • PARI
    {a(n)=1+sum(k=4,n+3,k!)*3/4!}
    for(n=0,25,print1(a(n),", "))
    
  • SageMath
    [sum(factorial(j) for j in (2..n+3))/8 for n in (0..30)] # G. C. Greubel, Sep 05 2022

Formula

G.f. satisfies A(x) = (1-x)/(1 - 5*x + 5*x^2) * (1 + x^2*A'(x)).
a(n) = 1 + Sum_{k=4..n+3} k!*3/4! for n > 0, with a(0)=1.
G.f.: W(0)/(8*x*(1-x)) -1/(4*x), where W(k) = 1 + 1/( 1 - x*(k+3)/( x*(k+3) + 1/W(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 20 2013
G.f.: (Sum_{n>=0} (n+2)!*x^n)/(8*x*(1-x)) - 1/(4*x). - Sergei N. Gladkovskii, Aug 20 2013
a(n) = (1/8)*(A007489(n+3) - 1) = (1/8)*(A003422(n+4) - 2). - G. C. Greubel, Sep 05 2022

A309579 Maximum principal ratio of a strongly connected digraph on n nodes.

Original entry on oeis.org

2, 6, 22, 102, 582, 3942, 30822, 272742, 2691942, 29303142, 348637542, 4499984742, 62618845542, 934401757542, 14882928349542, 252007880413542, 4520257017565542, 85616990623453542, 1707551662741213542, 35768179777214173542, 785101998295619293542, 18019779824218937053542
Offset: 3

Views

Author

Sinan G. Aksoy, Aug 08 2019

Keywords

Comments

The principal ratio of a strongly connected digraph is the ratio of largest to smallest entries in the stationary distribution of a simple random walk on that digraph.

Crossrefs

Cf. A056199.

Programs

  • PARI
    a(n) = (2/3) * (n-1)! * ( n/(n-1) + (1/(n-1)!) * sum(i=1, n-3, i!)); \\ Michel Marcus, Aug 11 2019

Formula

a(n) = (2/3) * (n-1)! * ( n/(n-1) + (1/(n-1)!) * Sum_{i=1..n-3} i! ).
a(n) = 2 * A056199(n-1). - Alois P. Heinz, Aug 11 2019
Showing 1-4 of 4 results.