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.

A010551 Multiply successively by 1,1,2,2,3,3,4,4,..., n >= 1, a(0) = 1.

Original entry on oeis.org

1, 1, 1, 2, 4, 12, 36, 144, 576, 2880, 14400, 86400, 518400, 3628800, 25401600, 203212800, 1625702400, 14631321600, 131681894400, 1316818944000, 13168189440000, 144850083840000, 1593350922240000, 19120211066880000, 229442532802560000, 2982752926433280000
Offset: 0

Views

Author

Keywords

Comments

From Emeric Deutsch, Dec 14 2008: (Start)
Number of permutations of {1,2,...,n-1} having a single run of odd entries. Example: a(5)=12 because we have 1324,1342,3124,3142,2134,4132,2314,4312, 2413, 4213, 2431 and 4231.
a(n) = A152666(n-1,1). (End)
a(n+1) gives the permanent of the n X n matrix whose (i,j)-element is i+j-1 modulo 2. - John W. Layman, Jan 03 2011
From Daniel Forgues, May 20 2011: (Start)
a(0) = 1 since it is the empty product.
A010551(n-2), n >= 2, equal to (ceiling((n-2)/2))! * (floor((n-2)/2))!, gives the number of arrangements of n-2 entries from 2 to n-1, starting with an even entry and where the parity of adjacent entries alternates. This is the number of arrangements to investigate for row n of a prime pyramid (A051237). (End)
Partial products of A008619. - Reinhard Zumkeller, Apr 02 2012
Also size of the equivalence class of S_n containing the identity permutation under transformations of positionally adjacent elements of the form abc <--> acb where a < b < c, cf. A210667 (equivalently under such transformations of the form abc <--> bac where a < b < c.) - Tom Roby, May 15 2012
Row sums of A246117. - Peter Bala, Aug 15 2014
a(n) is the number of parity-alternating permutations of size n. A permutation is parity-alternating if it sends even integers to even, and odd to odd. - Per W. Alexandersson, Jun 06 2022
n divides a(n) if and only if n is not prime. Since a(n) = floor(n/2)!*floor((n+1)/2)!, if n is prime then n is not a factor of a(n). All the prime factors of a(n) are in fact less than or equal to (n+1)/2. If n is composite, then it's possible to write it as p*q with p and q less than or equal to n/2. So p and q are factors of a(n). - Davide Oliveri, Apr 01 2023
Number of permutations of {1, 2, ..., n-1} where each entry is not greater than twice the previous entry. - Dewangga Putra Sheradhien, Jul 13 2024

Examples

			G.f. = 1 + x + x^2 + 2*x^3 + 4*x^4 + 12*x^5 + 36*x^6 + 144*x^7 + 576*x^8 + ...
For n = 7, a(n) = 1*1*2*2*3*3*4 (7 factors), which is 144. - _Michael B. Porter_, Jul 03 2016
		

Crossrefs

Column k=2 of A275062.

Programs

  • Haskell
    a010551 n = a010551_list !! n
    a010551_list = scanl (*) 1 a008619_list
    -- Reinhard Zumkeller, Apr 02 2012
    
  • Magma
    [Factorial(n div 2)*Factorial((n+1) div 2): n in [0..25]]; // Vincenzo Librandi Jan 17 2018
    
  • Maple
    A010551 := proc(n)
        option remember;
        if n <= 1 then
            1
        else
            procname(n-1) *trunc( (n+1)/2 );
        fi;
    end:
  • Mathematica
    FoldList[ Times, 1, Flatten@ Array[ {#, #} &, 11]] (* Robert G. Wilson v, Jul 14 2010 *)
  • PARI
    {a(n)=local(X=x+x*O(x^n)); 1/polcoeff(besseli(0,2*X)+X*besseli(1,2*X),n,x)} \\ Paul D. Hanna, Apr 07 2005
    
  • PARI
    A010551(n)=(n\2)!*((n+1)\2)! \\ Michael Somos, Dec 29 2012, edited by M. F. Hasler, Nov 26 2017
    
  • Python
    def O(f):
        c = 1
        while len(f) > 1:
            f.sort()
            m = abs(f[0] - f[1])
            c *= m
            f[0] = m
            f.pop(1)
        return c
    a = lambda n: O(list(range(1, n+1)))
    print([a(n) for n in range(0, 26)]) # Darío Clavijo, Aug 24 2024

Formula

a(n) = floor(n/2)!*floor((n+1)/2)! is the number of permutations p of {1, 2, 3, ..., n} such that for every i, i and p(i) have the same parity, i.e., p(i) - i is even. - Avi Peretz (njk(AT)netvision.net.il), Feb 22 2001
a(n) = n!/binomial(n, floor(n/2)). - Paul Barry, Sep 12 2004
G.f.: Sum_{n>=0} x^n/a(n) = besseli(0, 2*x) + x*besseli(1, 2*x). - Paul D. Hanna, Apr 07 2005
E.g.f.: 1/(1-x/2) + (1/2)/(1-x/2)*arccos(1-x^2/2)/sqrt(1-x^2/4). - Paul D. Hanna, Aug 28 2005
G.f.: G(0) where G(k) = 1 + (k+1)*x/(1 - x*(k+1)/(x*(k+1) + 1/G(k+1) )); (continued fraction, 3-step). - Sergei N. Gladkovskii, Nov 28 2012
D-finite with recurrence: 4*a(n) - 2*a(n-1) - n*(n-1)*a(n-2) = 0. - R. J. Mathar, Dec 03 2012
a(n) = a(n-1) * (a(n-2) + a(n-3)) / a(n-3) for all n >= 3. - Michael Somos, Dec 29 2012
G.f.: 1 + x + x^2*(1 + x*(G(0) - 1)/(x-1)) where G(k) = 1 - (k+2)/(1-x/(x - 1/(1 - (k+2)/(1-x/(x - 1/G(k+1) ))))); (continued fraction). - Sergei N. Gladkovskii, Jan 15 2013
G.f.: 1 + x*(G(0) - 1)/(x-1) where G(k) = 1 - (k+1)/(1-x/(x - 1/(1 - (k+1)/(1-x/(x - 1/G(k+1) ))))); (continued fraction). - Sergei N. Gladkovskii, Jan 15 2013
G.f.: 1 + x*G(0), where G(k) = 1 + x*(k+1)/(1 - x*(k+2)/(x*(k+2) + 1/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jul 08 2013
G.f.: Q(0), where Q(k) = 1 + x*(k+1)/(1 - x*(k+1)/(x*(k+1) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 08 2013
Sum_{n >= 1} 1/a(n) = A130820. - Peter Bala, Jul 02 2016
a(n) ~ sqrt(Pi*n) * n! / 2^(n + 1/2). - Vaclav Kotesovec, Oct 02 2018
Sum_{n>=0} (-1)^n/a(n) = A229020. - Amiram Eldar, Apr 12 2021

A052618 Expansion of e.g.f. 1/((1-x)^2*(1-x^2)).

Original entry on oeis.org

1, 2, 8, 36, 216, 1440, 11520, 100800, 1008000, 10886400, 130636800, 1676505600, 23471078400, 348713164800, 5579410636800, 94152554496000, 1694745980928000, 32011868528640000, 640237370572800000, 13380961044971520000, 294381142989373440000
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

Permanent of the n X n (0, 1)-matrix with (i, j)-th entry equal to 0 iff (i=1, j=n), (i=2, j=1), (i=3, j=n), (i=4, j=1), ... - Simone Severini, Oct 17 2004
a(n) is the number of runs of odd entries in all permutations of {1,2,...,n+1}. Example: a(2)=8 because in the permutations 123, 132, 213, 231, 312 and 321 we have a total of 2+1+1+1+1+2 runs of odd entries. - Emeric Deutsch, Dec 14 2008
a(n) is the number of permutations of [n+2] whose first place is even and last place is odd (or any equivalent definition with two separate places in a permutation). - Olivier Gérard, Nov 07 2011

Examples

			The a(2) = 8 permutations of [4] starting with an even number and ending with an odd number are: 2143, 2341, 2413, 2431, 4123, 4213, 4231, 4321.
		

Crossrefs

Programs

  • Maple
    spec := [S,{S=Prod(Sequence(Z),Sequence(Z),Sequence(Prod(Z,Z)))},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
    a := proc (n) options operator, arrow: factorial(n)*floor((1/2)*n+1)*ceil((1/2)*n+1) end proc; seq(a(n), n = 0 .. 20); # Emeric Deutsch, Dec 14 2008
  • Mathematica
    With[{nn=20},CoefficientList[Series[1/((1-x)^2*(1-x^2)),{x,0,nn}],x] Range[ 0,nn]!] (* Harvey P. Dale, Jun 01 2019 *)

Formula

E.g.f.: -1/(-1+x)^2/(-1+x^2).
Recurrence: {a(0)=1, a(1)=2, (-n^2-5*n-4)*a(n)+a(n+2)-2*a(n+1)=0.}.
a(n) = (1/8*(-1)^(-n)+1/4*n^2+n+7/8)*n! for n>0.
From Emeric Deutsch, Dec 14 2008: (Start)
a(n) = n!*floor((n+2)/2)*ceiling((n+2)/2).
a(n) = Sum_{k>=1} (k*A152666(n+1,k)). (End)
a(n) = n!*A002620(n+2). - R. J. Mathar, Nov 27 2011
Sum_{n>=0} 1/a(n) = 4*(sinh(1) + gamma - CoshIntegral(1)) - 2 = 4*(A073742 + A001620 - A099284) - 2. - Amiram Eldar, Jan 22 2023

A152667 Triangle read by rows: T(n,k) is the number of permutations of {1,2,...,n} having k runs of even entries (n >= 2, 1 <= k <= floor(n/2)). For example, the permutation 321756498 has 3 runs of even entries: 2, 64 and 8.

Original entry on oeis.org

2, 6, 12, 12, 48, 72, 144, 432, 144, 720, 2880, 1440, 2880, 17280, 17280, 2880, 17280, 129600, 172800, 43200, 86400, 864000, 1728000, 864000, 86400, 604800, 7257600, 18144000, 12096000, 1814400, 3628800, 54432000, 181440000, 181440000, 54432000, 3628800
Offset: 2

Views

Author

Emeric Deutsch, Dec 14 2008

Keywords

Comments

Sum of entries in row n is n! (=A000142(n)). Row n contains floor(n/2) entries.
T(n,1) = A152873(n).
Sum_{k>=1} k*T(n,k) = A152668(n).
Mirror image of A145892.

Examples

			T(4,2) = 12 because we have 1234, 3214, 1432, 3412, 2134, 2314 and their reverses.
Triangle starts:
    2;
    6;
   12,   12;
   48,   72;
  144,  432,  144;
  720, 2880, 1440;
		

Crossrefs

Programs

  • Maple
    ae := proc (n, k) options operator, arrow: factorial(n)^2*binomial(n+1, k)*binomial(n-1, k-1) end proc: ao := proc (n, k) options operator, arrow: factorial(n)*factorial(n+1)*binomial(n-1, k-1)*binomial(n+2, k) end proc: T := proc (n, k) if `mod`(n, 2) = 0 then ae((1/2)*n, k) else ao((1/2)*n-1/2, k) end if end proc; for n to 12 do seq(T(n, k), k = 1 .. floor((1/2)*n)) end do; # yields sequence in triangular form
  • Mathematica
    T[n_, k_] := If[EvenQ[n], ((n/2)!)^2*Binomial[n/2+1, k]*Binomial[n/2-1, k-1], ((n-1)/2)!*((n-1)/2+1)!*Binomial[(n-1)/2-1, k-1]*Binomial[(n-1)/2+2, k]];
    Table[T[n, k], {n, 2, 12}, {k, 1, Floor[n/2]}] // Flatten (* Jean-François Alcover, Sep 24 2024 *)

Formula

T(2n,k) = (n!)^2 * binomial(n+1,k) binomial(n-1,k-1);
T(2n+1,k) = n!*(n+1)!*binomial(n-1,k-1)*binomial(n+2,k) (n >= 1).
Showing 1-3 of 3 results.