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

A007680 a(n) = (2n+1)*n!.

Original entry on oeis.org

1, 3, 10, 42, 216, 1320, 9360, 75600, 685440, 6894720, 76204800, 918086400, 11975040000, 168129561600, 2528170444800, 40537905408000, 690452066304000, 12449059983360000, 236887827111936000, 4744158915944448000, 99748982335242240000
Offset: 0

Views

Author

Keywords

Comments

Denominators in series for sqrt(Pi/4)*erf(x): sqrt(Pi/4)*erf(x)= x/1 - x^3/3 + x^5/10 - x^7/42 + x^9/216 -+ ...
Appears to be the BinomialMean transform of A000354 (after truncating the first term of A000354). (See A075271 for the definition of BinomialMean.) - John W. Layman, Apr 16 2003
Number of permutations p of {1,2,...,n+2} such that max|p(i)-i|=n+1. Example: a(1)=3 since only the permutations 312,231 and 321 of {1,2,3} satisfy the given condition. - Emeric Deutsch, Jun 04 2003
Stirling transform of A000670(n+1) = [3, 13, 75, 541, ...] is a(n) = [3, 10, 42, 216, ...]. - Michael Somos, Mar 04 2004
Stirling transform of a(n) = [2, 10, 42, 216, ...] is A052875(n+1) = [2, 12, 74, ...]. - Michael Somos, Mar 04 2004
A related sequence also arises in evaluating indefinite integrals of sec(x)^(2k+1), k=0, 1, 2, ... Letting u = sec(x) and d = sqrt(u^2-1), one obtains a(0) = log(u+d) 2*k*a(k) = (2*k-1)*u^(2*k-1)*d + a(k-1). Viewing these as polynomials in u gives 2^k*k!*a(k) = a(0) + d*Sum(i=0..k-1){ (2*i+1)*i!*2^i*u^(2*i+1) }, which is easily proved by induction. Apart from the power of 2, which could be incorporated into the definition of u (or by looking at erf(ix/2)/ i (i=sqrt(-1)), the sum's coefficients form our series and are the reciprocals of the power series terms for -sqrt(-Pi/4)*erf(ix/2)). This yields a direct but somewhat mysterious relationship between the power series of erf(x) and integrals involving sec(x). - William A. Huber (whuber(AT)quantdec.com), Mar 14 2002
When written in factoradic ("factorial base"), this sequence from a(1) onwards gives the smallest number containing two adjacent digits, increasing when read from left to right, whose difference is n-1. - Christian Perfect, May 03 2016
a(n-1)^2 is the number of permutations p of [1..2n] such that Sum_{i=1..2n} abs(p(i)-i) = 2n^2-2. - Fang Lixing, Dec 07 2018
A standard series for the calculation of coordinates on a clothoid (also called cornuspiral):
x = s*(a(0) - (tau^2/a(2)) + (tau^4/a(4)) - (tau^6/a(6)) + ...)
y = s*((tau/a(1)) + (tau^3/a(3)) - (tau^5/a(5)) + ...).
s is the arclength from the clothoids origin to the desired point p(x,y). The tangent at the clothoids origin intersects with the tangent at the point p(x,y) with an angle of tau. - Thomas Scheuerle, Oct 13 2021
a(n) = P_n(1) where P_n(x) is the Pidduck polynomials. - Michael Somos, May 27 2023

Examples

			G.f. = 1 + 3*x + 10*x^2 + 42*x^3 + 216*x^4 + 1320*x^5 + 9360*x^6 + ... - _Michael Somos_, Jan 01 2019
		

References

  • H. W. Gould, A class of binomial sums and a series transform, Utilitas Math., 45 (1994), 71-83.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • N. Wirth, Systematisches Programmieren, 1975, exercise 9.3

Crossrefs

From Johannes W. Meijer, Nov 12 2009: (Start)
Appears in A167546.
Equals the rows sums of A167556.
(End)

Programs

  • GAP
    a:=List([0..20],n->(2*n+1)*Factorial(n));; Print(a); # Muniru A Asiru, Jan 01 2019
  • Magma
    [(2*n+1)*Factorial(n): n in [0..20]]; // Vincenzo Librandi, Aug 20 2011
    
  • Maple
    [(2*n+1)*factorial(n)$n=0..20]; # Muniru A Asiru, Jan 01 2019
  • Mathematica
    Table[(2n + 1)*n!, {n, 0, 20}] (* Stefan Steinerberger, Apr 08 2006 *)
  • PARI
    {a(n) = if( n<0, 0, (2*n+1) * n!)}; /* Michael Somos, Mar 04 2004 */
    

Formula

E.g.f.: (1+x)/(1-x)^2.
This is the binomial mean transform of A000354 (after truncating the first term). See Spivey and Steil (2006). - Michael Z. Spivey (mspivey(AT)ups.edu), Feb 26 2006
E.g.f.: (of aerated sequence) 1+x^2/2+sqrt(pi)*(x+x^3/4)*exp(x^2/4)*ERF(x/2). - Paul Barry, Apr 11 2010
G.f.: 1 + x*G(0), where G(k)= 1 + x*(k+1)/(1 - (k+2)/(k+2 + (k+1)/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jul 08 2013
a(n-2) = (A208528(n)+A208529(n))/2, for n>=2. - Luis Manuel Rivera Martínez, Mar 05 2014
D-finite with recurrence: (-2*n+1)*a(n) +n*(2*n+1)*a(n-1)=0. - R. J. Mathar, Jan 27 2020
Sum_{n>=0} 1/a(n) = sqrt(Pi)*erfi(1)/2 = A019704 * A099288 = A347910. - Amiram Eldar, Oct 07 2020
Sum_{n>=0} (-1)^n/a(n) = A347909 . - R. J. Mathar, Sep 30 2021

A208529 Number of permutations of n > 1 having exactly 2 points on the boundary of their bounding square.

Original entry on oeis.org

2, 2, 4, 12, 48, 240, 1440, 10080, 80640, 725760, 7257600, 79833600, 958003200, 12454041600, 174356582400, 2615348736000, 41845579776000, 711374856192000, 12804747411456000, 243290200817664000, 4865804016353280000, 102181884343418880000
Offset: 2

Views

Author

David Nacin, Feb 27 2012

Keywords

Comments

A bounding square for a permutation of n is the square with sides parallel to the coordinate axis containing (1,1) and (n,n), and the set of points P of a permutation p is the set {(k,p(k)) for 0 < k < n+1}.
Sequences A098558 and A052849 have the same terms except for the first. - Joerg Arndt, Mar 03 2012
a(n) is the number of permutations of n symbols that commute with a transposition: a permutation p of {1,...,n} has exactly two points on the boundary of their bounding square if and only if p commutes with transposition (1, n). - Luis Manuel Rivera Martínez, Feb 27 2014
a(n) is also the determinant of a matrix M each of whose elements M(i, j) is the result of a Reverse and Add operation (RADD) on i in base j: M(i,j) = i + (reverse(i) represented in base j), with 1 <= i < n and 1 < j <= n. - Federico Provvedi, May 10 2024

Examples

			a(2) = 2 because {(1,1),(2,2)} and {(1,2),(2,1)} each have two points on the bounding square.
		

Crossrefs

Programs

Formula

a(n) = 2*(n-2)!.
G.f.: G(0), where G(k) = 1 + 1/(1 - x*(k+1)/(x*(k+1) + 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 26 2013
G.f.: 2 + 2*x/Q(0), where Q(k) = 1 - 2*x*(2*k+1) - x^2*(2*k+1)*(2*k+2)/( 1 - 2*x*(2*k+2) - x^2*(2*k+2)*(2*k+3)/Q(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Sep 23 2013
a(n) = 2*n!/(n*(n-1)). - Vincenzo Librandi, Apr 15 2014
E.g.f.: 2 - (1 - x)*(2 + log(1/(1 - x)^2)). - Ilya Gutkovskiy, Mar 21 2018
Sum_{n>=2} 1/a(n) = e/2. - Amiram Eldar, Feb 02 2023

A098916 Permanent of the n X n (0,1)-matrices with ij-th entry equal to zero iff (i=1,j=1),(i=1,j=n),(i=n,j=1) and (i=n,j=n).

Original entry on oeis.org

0, 4, 36, 288, 2400, 21600, 211680, 2257920, 26127360, 326592000, 4390848000, 63228211200, 971415244800, 15866448998400, 274611617280000, 5021469573120000, 96746980442112000, 1959126353952768000
Offset: 3

Views

Author

Simone Severini, Oct 17 2004

Keywords

Comments

The number of all possible ways to permute n distinct aligned balls, one is blue, 2 are red and the remaining are green, such that no red ball occurs by the side of the blue ball. It may generalized to r red balls: a(n,r) = (n-r-1)(n-r)(n-2)!. - Alessandro Nicolosi (xxalenicxx(AT)hotmail.com), Jul 12 2006
A formula for the permanents of these n X n matrices(A) can be easily derived by minor expansion along the first row: a(n)=per(A)=(n-2)*per(B), where B is the n-1 X n-1 (0,1)-matrix with bij=0 iff (i=n,j=1) and (i=n,j=n). A new minor expansion along the last row of B yields: per(B)=(n-3)*per(C)=(n-3)*(n-2)! since C is the n-2 X n-2 1-matrix. Hence: a(n)=(n-2)*(n-3)*(n-2)!. - Herman Jamke (hermanjamke(AT)fastmail.fm), May 13 2007
Number of permutations of n-1 having exactly 4 points P on the boundary of their bounding square. (A bounding square for a permutation of n is the square with sides parallel to the coordinate axis containing (1,1) and (n,n), and the set of points P of a permutation p is the set {(k,p(k)) for 0David Nacin, Feb 27 2012
a(n) is also the number of permutations of n symbols that 4-commute with a transposition (see A233440 for definition): a permutation p of {1,...,n} has exactly four points on the boundary of their bounding square if and only if p 4-commutes with transposition (1, n). - Luis Manuel Rivera Martínez, Feb 27 2014

Examples

			a(3) = 0 because no configuration is allowed, the 2 red balls always occurs by the side of the blue ball. a(4) = 4 because we can have 4 possible permutations: b,g1,r1,r2 b,g1,r2,r1 r1,r2,g1,b r2,r1,g1,b.
		

Crossrefs

Programs

  • Maple
    a:= n->(n-2)*(n-3)*(n-2)!: seq(a(n), n=3..20); # Zerinvary Lajos, Jul 01 2007
  • Mathematica
    a[n_,r_] := (n-r-1)(n-r)(n-2)! (* Alessandro Nicolosi (xxalenicxx(AT)hotmail.com), Jul 12 2006 *)
    Table[(n-2)*(n-3)*(n-2)!,{n,3,30}] (* Vincenzo Librandi, Feb 27 2012 *)
  • PARI
    permRWNb(a)=n=matsize(a)[1]; if(n==1,return(a[1,1])); sg=1; in=vectorv(n); x=in; x=a[,n]-sum(j=1,n,a[,j])/2; p=prod(i=1,n,x[i]); for(k=1,2^(n-1)-1,sg=-sg; j=valuation(k,2)+1; z=1-2*in[j]; in[j]+=z; x+=z*a[,j]; p+=prod(i=1,n,x[i],sg)); return(2*(2*(n%2)-1)*p)
    for(n=3,24,a=matrix(n,n,i,j,1); a[1,1]=0; a[1,n]=0; a[n,1]=0; a[n,n]=0; print1(permRWNb(a)", ")) \\ Herman Jamke (hermanjamke(AT)fastmail.fm), May 13 2007
    
  • PARI
    for(n=3,24,print1((n-2)*(n-3)*(n-2)!", ")) \\ Herman Jamke (hermanjamke(AT)fastmail.fm), May 13 2007
    
  • Python
    import math
    def a(n):
        return (n-2)*(n-3)*math.factorial(n-2) # David Nacin, Feb 27 2012

Formula

a(n) = (n-2)*(n-3)*(n-2)!. - Herman Jamke (hermanjamke(AT)fastmail.fm), May 13 2007
From Amiram Eldar, May 17 2022: (Start)
Sum_{n>=4} 1/a(n) = 3 - e, where e = A001113.
Sum_{n>=4} (-1)^n/a(n) = 2*(gamma - Ei(-1)) - 1/e - 1, where gamma = A001620 and Ei(-1) = -A099285. (End)

Extensions

More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), May 13 2007
Showing 1-3 of 3 results.