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 41-44 of 44 results.

A141052 Number of runs or rising sequences of length 2 among all permutations of n.

Original entry on oeis.org

1, 4, 21, 130, 930, 7560, 68880, 695520, 7711200, 93139200, 1217462400, 17124307200, 257902444800, 4140968832000, 70614415872000, 1274546617344000, 24275666967552000, 486580401635328000, 10238462617743360000, 225651661258383360000, 5198503365971435520000
Offset: 2

Views

Author

Harlan J. Brothers, Jul 31 2008, Aug 24 2008

Keywords

Examples

			a[3]=4 because of the 6 permutations of n=3, there are 4 ascending runs of length 2:
{1,3} in {1,3,2}
{1,3} in {2,1,3}
{2,3} in {2,3,1}
{1,2} in {3,1,2}
a[3]=4 because of the 6 permutations of n=3, there are 4 rising sequences of length 2:
{1,2} in {1,3,2}
{2,3} in {2,1,3}
{2,3} in {2,3,1}
{1,2} in {3,1,2}
		

Crossrefs

Programs

  • Mathematica
    Table[n!(5n + 1)/4! + Floor[2/n](1/12), {n, 2, 10}]

Formula

a(n) = n!*(5n+1)/4! + floor(2/n)*(1/12), n>=2.
Recurrence: a(n) = (n+1)*a(n-1)+(n-1)!/6, n>=2, with a(2)=1 and a(3)=4.
E.g.f.: x^2*(x-2)*(x-6)/(24*(x-1)^2).

Extensions

First example and typo in second example corrected by Harlan J. Brothers, Apr 29 2013

A196080 Numerators of the sum of the n-th partial sums of the expansions of e and 1/e.

Original entry on oeis.org

2, 2, 3, 3, 37, 37, 1111, 1111, 6913, 6913, 799933, 799933, 739138093, 739138093, 44841044309, 44841044309, 32285551902481, 32285551902481, 9879378882159187, 9879378882159187, 1251387991740163687
Offset: 0

Views

Author

Paul Curtz, Sep 27 2011

Keywords

Comments

The n-th partial sums of the Taylor expansion of E are f(n) = A061354(n)/A061355(n) = 1, 2, 5/2, 8/3, 65/24, 163/60,.. .
The partial sums of an expansion of 1/e are essentially A000255(n-2)/A001048(n-1) preceded by 1 and 0, namely g(n)= 1, 0, 1/2, 1/3, 3/8, 11/30, 53/144, 103/280, 2119/5760,... (Jolley's partial sums of 1/E in A068985 is the bisection 0, 1/3, 11/30, 103/280, 16687/45360,... of g(n).)
The current sequence are the numerators of f(n)+g(n), converging to E+1/E, namely 2, 2, 3, 3, 37/12, 37/12, 1111/360, 1111/360, 6913/2240 = 62217/21060, 6913/2240 = 62217/21060, 799933/259200 = 5599531/1814400,... The unreduced fractions are apparently given by duplicated A051396(n+1)/A002674(n).

Examples

			a(0)=1+1, a(1)=2+0, a(2)=(5+1)/2, a(3)=(8+1)/3.
		

Crossrefs

Cf. A001113, A068985, A137204 (e+1/e).

Programs

  • Mathematica
    a[n_] := (E*Gamma[n+1, 1] + (1/E)*Gamma[n+1, -1])/n! // FullSimplify // Numerator; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Aug 02 2012 *)

Extensions

Redefined by reduced fractions. - R. J. Mathar, Jul 02 2012

A350227 Triangular array read by rows. T(n,k) is the number of partial permutations on [n] with exactly k connected components, n>=0, 0<=k<=n.

Original entry on oeis.org

1, 0, 2, 0, 3, 4, 0, 8, 18, 8, 0, 30, 91, 72, 16, 0, 144, 540, 590, 240, 32, 0, 840, 3718, 5085, 2900, 720, 64, 0, 5760, 29232, 47516, 34230, 12040, 2016, 128, 0, 45360, 258732, 484092, 416857, 186480, 44576, 5376, 256, 0, 403200, 2547360, 5368184, 5340888, 2869314, 876960, 151872, 13824, 512
Offset: 0

Views

Author

Geoffrey Critzer, Dec 20 2021

Keywords

Examples

			Triangle begins:
  1;
  0,   2;
  0,   3,   4;
  0,   8,  18,   8;
  0,  30,  91,  72,  16;
  0, 144, 540, 590, 240, 32;
  ...
		

Crossrefs

Cf. A000079, A132393, A001048, A002720 (row sums).

Programs

  • Mathematica
    nn = 9; Table[Take[(Range[0, nn]! CoefficientList[Series[1/(1 - x)^y Exp[y x/(1 - x)], {x, 0, nn}], {x, y}])[[i, All]], i], {i, 1, nn + 1}] // Grid

Formula

T(n,n) = 2^n = A000079(n) (counts the idempotent elements).
For n>=1, T(n,1) = (n-1)! + n! = A001048(n) (the component is a cycle or a directed path to a point with a self loop).
E.g.f.: exp(y*log(1/(1-x)))*exp(y*x/(1-x)).

A385577 Array read by ascending antidiagonals: A(n,m) = n*Pochhammer(n+1,m+1)/(m+2).

Original entry on oeis.org

0, 1, 0, 3, 2, 0, 6, 8, 6, 0, 10, 20, 30, 24, 0, 15, 40, 90, 144, 120, 0, 21, 70, 210, 504, 840, 720, 0, 28, 112, 420, 1344, 3360, 5760, 5040, 0, 36, 168, 756, 3024, 10080, 25920, 45360, 40320, 0, 45, 240, 1260, 6048, 25200, 86400, 226800, 403200, 362880, 0
Offset: 0

Views

Author

Stefano Spezia, Jul 03 2025

Keywords

Examples

			Array begins as:
   0,  0,   0,    0,     0,     0,      0, ...
   1,  2,   6,   24,   120,   720,   5040, ...
   3,  8,  30,  144,   840,  5760,  45360, ...
   6, 20,  90,  504,  3360, 25920, 226800, ...
  10, 40, 210, 1344, 10080, 86400, 831600, ...
  ...
		

References

  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 20.

Crossrefs

Cf. A000217 (m=0), A033487 (m=2), A158874 (m=3).
Cf. A000004 (n=0).

Programs

  • Mathematica
    A[n_,m_]:=n*Pochhammer[n+1,m+1]/(m+2); Table[A[n-m,m],{n,0,9},{m,0,n}]//Flatten

Formula

Sum_{m=0..n} A(n-m,m) = A006231(n+1).
A(n,1) = A007290(n+2).
A(1,n) = A000142(n+1).
A(2,n) = A001048(n+2).
A(3,n) = abs(A238474(n+1)).
A(n,n) = n!*A002740(n+2)
Previous Showing 41-44 of 44 results.