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 11-20 of 31 results. Next

A113012 Numerators of convergents to 1 + 2/(3 + 4/(5 + 6/(7 + ...))).

Original entry on oeis.org

1, 5, 29, 233, 2329, 27949, 78257, 6260561, 112690097, 2253801941, 49583642701, 47600296993, 30940193045449, 866325405272573, 25989762158177189, 831672389061670049, 5655372245619356333, 1017967004211484139941, 38682746160036397317757, 1547309846401455892710281
Offset: 0

Views

Author

Eric W. Weisstein, Oct 10 2005

Keywords

Examples

			1, 5/3, 29/19, 233/151, 2329/1511, ...
		

Crossrefs

Programs

  • GAP
    List(List([0..20],n->Sum([0..n],k->(-1)^k*(1/(Product([0..Int(2*k/2)-1],i->2*k-2*i))))),NumeratorRat); # Muniru A Asiru, Apr 14 2018
  • Mathematica
    Numerator[Table[Sum[(-1)^k*1/(2k)!!,{k,0,n}],{n,1,25}]] (* Alexander Adamchuk, Jul 02 2006 *)
    f[n_] := Fold[ Last@ #2 + First@ #2/#1 &, 2n - 1, Partition[ Reverse@ Range[ 2n - 2], 2]]; Numerator[ Array[ f, 18]]  (* Robert G. Wilson v, Jul 07 2012 *)
    a[ n_] := If[ n < 0, 0, Numerator[ 1 + ContinuedFractionK[2 i, 2 i + 1, {i, 1, n}]]]; (* Michael Somos, Apr 14 2018 *)
    Table[1 + ContinuedFractionK[2 k, 2 k + 1, {k, n}], {n, 0, 20}] // Numerator (* Eric W. Weisstein, Apr 14 2018 *)
    Table[1/((Sqrt[E] Gamma[n + 2])/Gamma[n + 2, -1/2] - 1), {n, 0, 20}] // Numerator (* Eric W. Weisstein, Apr 14 2018 *)
  • PARI
    {a(n) = my(A); if( n<0, 0, A = contfracpnqn( matrix(2, n, j, i, [2*i, 2*i+1] [j]) ); numerator( 1 + A[2, 1] / A[1, 1]) )}; /* Michael Somos, Apr 14 2018 */
    

Formula

a(n) = Numerator(Sum_{k=0..n+1} (-1)^k*1/(2k)!!). - Alexander Adamchuk, Jul 02 2006
a(n) <= A000354(n+1). - Michael Somos, Sep 28 2017

A271212 a(n) = (2n-1)*a(n-1) + 2*(n-2)*a(n-2).

Original entry on oeis.org

1, 2, 6, 34, 262, 2562, 30278, 419234, 6651846, 118950658, 2366492038, 51837444642, 1239591067526, 32130200470274, 897265598318022, 26856087563449762, 857662151219847238, 29108533617158451714, 1046243865439580921606, 39700713164247881457698, 1585992592561492290028038
Offset: 0

Views

Author

Jonathan Burns, Apr 02 2016

Keywords

Comments

a(n) is the number of reduced rearrangement maps on n blocks. A rearrangement map is a signed permutation, e.g., +2 -1 -3. If the permutation contains (i)(i+1) or -(i+1)-(i) for any i, then it is not reduced.
Number of permutations p of [2n] such that each element in p has exactly one neighbor whose value is smaller or larger by one. a(2) = 6: 1243, 2134, 2143, 3412, 3421, 4312. - Alois P. Heinz, May 24 2023

Examples

			For n=1 the a(1)=2 solutions are {+1,-1}.
For n=2 the a(2)=6 solutions are {+1-2,-1+2,-1-2,+2+1,+2-1,-2+1}. Note that {+1+2,-2-1} are not reduced rearrangement maps.
		

References

  • J. Burns, Counting a Class of Signed Permutations and Rigid Vertex Graphs related to Patterns of DNA Rearrangement, Preprint.

Crossrefs

Programs

  • Mathematica
    RecurrenceTable[{a[n]==(2n-1)*a[n-1]+2(n-2)*a[n-2],a[0]==1,a[1]==2},a[n],{n,0,10}]
    Table[Round[Exp[-1/2]*(2n+1)*2^(n-1)*(n-1)!],{n,10}]

Formula

a(n) = (2n-1)*a(n-1) + 2*(n-2)*a(n-2); a(0)=1; a(1)=2;
a(n) = e^(-1/2)*(2n+1)*Gamma(n,-1/2)+(-1)^n
a(n) = e^(-1/2)*(2n+1)*2^(n-1)*(n-1)! + (-1)^(n+1)*(2n^2 + 3n)^(-1)* 2_F_2(1, n+1/2; n+1, n+5/2; -1/2)
a(n) = round( e^(-1/2)*(2n+1)*2^(n-1)*(n-1)! )
a(n) ~ (Pi*2n/e)^(1/2) * (2n/e)^n
From Peter Bala, May 29 2022: (Start)
a(n) = Sum_{k = 0..n-1} (-1)^(n-1+k)*2^(k+1)*(k+1)!*binomial(n-1,k) for n >= 1.
2*exp(-x)/(1 - 2*x)^2 = 2 + 6*x + 34*x^2/2! + 262*x^3/3! + 2562*x^4/4! + ... = Sum_{n >= 0} a(n+1)*x^n/n! is an e.g.f. for the sequence (a(n+1))n>=0.
a(n) = A000354(n) + A000354(n-1) for n >= 1. (End)

A319392 a(n) = Sum_{k=0..n} (-1)^(n-k)*binomial(n,k)*k!*n^k.

Original entry on oeis.org

1, 0, 5, 116, 4785, 307024, 28435285, 3598112580, 596971515329, 125802906617600, 32834740225688901, 10399056510149276980, 3929349957207906673585, 1746371472945523953503376, 901944505258819679842017365, 535692457387043907059336566724, 362573376628272441934460817960705
Offset: 0

Views

Author

Ilya Gutkovskiy, Sep 18 2018

Keywords

Crossrefs

Main diagonal of A320032.

Programs

  • Maple
    b:= proc(n, k) option remember;
         `if`(n=0, 1, k*n*b(n-1, k)+(-1)^n)
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..17);  # Alois P. Heinz, May 07 2020
  • Mathematica
    Join[{1}, Table[Sum[(-1)^(n - k) Binomial[n, k] k! n^k, {k, 0, n}], {n, 16}]]
    Table[n! SeriesCoefficient[Exp[-x]/(1 - n x), {x, 0, n}], {n, 0, 16}]
    Table[(-1)^n HypergeometricPFQ[{1, -n}, {}, n], {n, 0, 16}]
  • PARI
    a(n) = sum(k=0, n, (-1)^(n-k)*binomial(n,k)*k!*n^k); \\ Michel Marcus, Sep 18 2018

Formula

a(n) = n! * [x^n] exp(-x)/(1 - n*x).
a(n) = exp(-1/n)*n^n*Gamma(n+1,-1/n) for n > 0, where Gamma(a,x) is the incomplete gamma function.
a(n) ~ n! * n^n. - Vaclav Kotesovec, Jun 09 2019

A120765 Expansion of e.g.f. -exp(-x)*log(1-2*x)/2.

Original entry on oeis.org

0, 1, 0, 5, 24, 209, 2120, 25829, 365456, 5895105, 106794992, 2147006949, 47436635752, 1142570789073, 29797622256376, 836527783016197, 25153234375160992, 806519154686509057, 27470342073410272608, 990496662138073867333, 37692249497898323450424
Offset: 0

Views

Author

Max Alekseyev, Jul 03 2006

Keywords

Comments

Inverse binomial transform of even double factorials (A000165) with 0 prepended: [0, 1, 2, 8, 48 ...].

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<3, n*(2-n),
          (2*n-4)*(a(n-1) +a(n-3)) +(4*n-7)*a(n-2))
        end:
    seq(a(n), n=0..25);  # Alois P. Heinz, Oct 08 2013
    A120765 := n -> (-1)^(n+1)*n*hypergeom([1-n,1,1],[2],2):
    seq(simplify(A120765(n)), n=0..20); # Peter Luschny, May 09 2017
  • Mathematica
    CoefficientList[Series[-E^(-x)*Log[1-2*x]/2, {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec, Oct 08 2013 *)
  • PARI
    my(x='x+O('x^33)); concat([0],Vec(serlaplace(-exp(-x)*log(1-2*x)/2))) \\ Joerg Arndt, Jun 29 2015
    
  • PARI
    vector(30, n, n--; sum(k=0, n-1, (-1)^(n-1-k) * binomial(n,k+1) * k! * 2^k)) \\ Altug Alkan, Oct 28 2015

Formula

E.g.f.: -e^(-x)*log(1-2*x)/2.
a(n) = Sum_{i=0..n-1} (-1)^(n-1-i) * C(n,i+1) * i! * 2^i.
a(n) ~ (n-1)! * 2^(n-1) * exp(-1/2). - Vaclav Kotesovec, Oct 08 2013
From Vladimir Reshetnikov, Oct 28 2015: (Start)
a(n) = Sum_{k=0..n-1} A000354(k)*(-1)^(n+k+1).
Recurrence: a(0) = 0, a(1) = 1, a(2) = 0, a(n) = 2*(n-2)*a(n-3) + (4*n-7)*a(n-2) + 2*(n-2)*a(n-1). (End)
a(n) = (-1)^(n+1)*n*hypergeom([1-n,1,1],[2],2). - Peter Luschny, May 09 2017

Extensions

Formula corrected by Max Alekseyev, Sep 15 2009

A161936 The number of direct isometries that are derangements of the (n-1)-dimensional facets of an n-cube.

Original entry on oeis.org

0, 3, 14, 117, 1164, 13975, 195642, 3130281, 56345048, 1126900971, 24791821350, 595003712413, 15470096522724, 433162702636287, 12994881079088594, 415836194530835025, 14138430614048390832, 508983502105742069971, 19341373080018198658878, 773654923200727946355141
Offset: 1

Views

Author

Elizabeth McMahon, Gary Gordon (mcmahone(AT)lafayette.edu), Jun 29 2009

Keywords

Comments

a(n) plays the same role as A003221 plays for the derangement numbers A000166.

Examples

			For a square, the 3 rotations are direct edge derangements. For a 3-cube, the 6 edge-centered rotations and the 8 vertex-centered rotations are direct face derangements.
		

Crossrefs

Programs

Formula

a(n) = (b(n) + (-1)^n)/2, where b(n) is sequence A000354, i.e., the number of (n-1)-dimensional facet derangements of an n-cube.
From Peter Luschny, May 09 2017: (Start)
a(n) = (-1)^n*(1-n*hypergeom([1,1-n],[],2)).
a(n) = (2^n*Gamma(n+1,-1/2)/exp(1/2)+(-1)^n)/2. (End)

Extensions

More terms from Peter Luschny, May 09 2017

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

Original entry on oeis.org

1, 1, 9, 161, 5153, 257649, 18550729, 1817971441, 232700344449, 37697455800737, 7539491160147401, 1824556860755671041, 525472375897633259809, 177609663053400041815441, 69622987916932816391652873, 31330344562619767376243792849, 16041136416061320896636821938689
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 27 2021

Keywords

Crossrefs

Programs

  • Mathematica
    Table[2^n n!^2 Sum[1/((-2)^k k!^2), {k, 0, n}], {n, 0, 16}]
    nmax = 16; CoefficientList[Series[BesselJ[0, 2 Sqrt[x]]/(1 - 2 x), {x, 0, nmax}], x] Range[0, nmax]!^2
  • PARI
    a(n) = 2^n * (n!)^2 * sum(k=0, n, 1 / ((-2)^k * (k!)^2)); \\ Michel Marcus, Jan 28 2021

Formula

Sum_{n>=0} a(n) * x^n / (n!)^2 = BesselJ(0,2*sqrt(x)) / (1 - 2*x).
a(0) = 1; a(n) = 2 * n^2 * a(n-1) + (-1)^n.

A136807 Hankel transform of double factorial numbers n!*2^n=A000165(n).

Original entry on oeis.org

1, 4, 256, 589824, 86973087744, 1282470362637926400, 2723154477021188283432960000, 1133321924829207204666583887642624000000, 120746421332702772771144114237731253721340313600000000
Offset: 0

Views

Author

Paul Barry, Jan 23 2008

Keywords

Comments

By the properties of the Hankel transform, a(n)=2^(n(n+1))*A055209(n).
Also Hankel transform of A000354, A010844, A082032. - Philippe Deléham, Jan 23 2008

Crossrefs

Programs

  • Magma
    [1] cat [(&*[(2*k)^(2*(n-k+1)): k in [1..n]]): n in [1..10]]; // G. C. Greubel, Oct 14 2018
  • Mathematica
    Table[Product[(2k)^(2(n-k+1)),{k,n}],{n,0,10}] (* Harvey P. Dale, Apr 11 2013 *)
  • PARI
    for(n=0,10, print1(prod(k=1,n,(2*k)^(2*(n-k+1))), ", ")) \\ G. C. Greubel, Oct 14 2018
    

Formula

a(n) = Product_{k=1..n} (2k)^(2(n-k+1)).
a(n) ~ 2^((n+1)^2) * Pi^(n+1) * n^(n^2 + 2*n + 5/6) / (A^2 * exp(3*n^2/2 + 2*n - 1/6)), where A is the Glaisher-Kinkelin constant A074962. - Vaclav Kotesovec, Feb 24 2019

A161937 The number of indirect isometries that are derangements of the (n-1)-dimensional facets of an n-cube.

Original entry on oeis.org

1, 2, 15, 116, 1165, 13974, 195643, 3130280, 56345049, 1126900970, 24791821351, 595003712412, 15470096522725, 433162702636286, 12994881079088595, 415836194530835024, 14138430614048390833, 508983502105742069970, 19341373080018198658879, 773654923200727946355140
Offset: 1

Views

Author

Elizabeth McMahon, Gary Gordon (mcmahone(AT)lafayette.edu), Jun 29 2009

Keywords

Comments

a(n) plays the same role as A000387 plays for the derangement numbers A000166.

Examples

			For a square, the 2 diagonal reflections are indirect edge derangements. For a 3-cube, the 15 rotary reflections are indirect face derangements.
		

Crossrefs

Programs

  • Maple
    a := n -> (-1)^(n+1)*n*hypergeom([1,1-n],[],2):
    seq(simplify(a(n)), n=1..20); # Peter Luschny, May 09 2017
  • Mathematica
    a[n_] := (-1)^(n + 1)*n*HypergeometricPFQ[{1, 1 - n}, {}, 2];
    Array[a, 20] (* Jean-François Alcover, Jul 14 2018, after Peter Luschny *)

Formula

a(n) = (b(n) + (-1)^(n+1))/2, where b(n) is sequence A000354, i.e., the number of (n-1)-dimensional facet derangements of an n-cube.
From Peter Luschny, May 09 2017: (Start)
a(n) = (-1)^(n+1)*n*hypergeom([1, 1-n], [], 2).
a(n) = (2^n*Gamma(n+1,-1/2)/exp(1/2)-(-1)^n)/2. (End)
E.g.f.: x*exp(-x) / (1 - 2*x). - Ilya Gutkovskiy, May 23 2020

Extensions

More terms from Peter Luschny, May 09 2017

A263895 Expansion of e.g.f.: exp(-x)*x/(1-2*x)^2.

Original entry on oeis.org

0, 1, 6, 51, 524, 6405, 90834, 1467319, 26607384, 535277961, 11832460190, 285105945531, 7437546405156, 208846303056781, 6280859188226154, 201420656725873215, 6861297209758777904, 247422535745846839569, 9416194788956228294454, 377156775060354873848131
Offset: 0

Views

Author

Vladimir Reshetnikov, Oct 28 2015

Keywords

Examples

			G.f. = x + 6*x^2 + 51*x^3 + 524*x^4 + 6405*x^5 + 90834*x^6 + 1467319*x^7 + ...
		

Crossrefs

Cf. A000354.

Programs

  • GAP
    a:=[0,1,6];; for n in [4..25] do a[n]:=2*n*a[n-1]+3*a[n-2]+2*(3-n)*a[n-3]; od; a; # Muniru A Asiru, Jul 31 2018
  • Maple
    seq(coeff(series(factorial(n)*exp(-x)*x/(1-2*x)^2, x,n+1),x,n),n=0..25); # Muniru A Asiru, Jul 31 2018
  • Mathematica
    Round@Table[2^n (2 Gamma[n+2, -1/2] - Gamma[n+1, -1/2])/(4 Sqrt[E]), {n, 0, 20}]
    With[{nmax = 30}, CoefficientList[Series[Exp[-x]*x/(1 - 2*x)^2, {x, 0, nmax}], x]] (* G. C. Greubel, Jul 31 2018 *)
  • PARI
    x='x+O('x^30); concat([0], Vec(serlaplace(exp(-x)*x/(1-2*x)^2))) \\ G. C. Greubel, Jul 31 2018
    

Formula

a(n) = 2^n*(2*Gamma(n+2,-1/2)-Gamma(n+1,-1/2))*exp(-1/2)/4, where Gamma(a,x) is the upper incomplete Gamma function.
a(n) = (A000354(n+1)-A000354(n))/4.
For n > 0, a(n) = (-1)^(n+1)*n*hypergeom([2,1-n],[],2).
Recurrence: a(0) = 0, a(1) = 1, a(2) = 6, a(n) = 2*(n+1)*a(n-1) + 3*a(n-2) + 2*(2-n)*a(n-3).
0 = a(n)*(+2*a(n+1) - 3*a(n+2) - 8*a(n+3) + a(n+4)) + a(n+1)*(+3*a(n+1) + 4*a(n+2) - 4*a(n+3)) + a(n+2)*(+3*a(n+2) + 2*a(n+3) - a(n+4)) + a(n+3)*(+a(n+3)) for all n>=0. - Michael Somos, Oct 29 2015

A331688 E.g.f.: exp(-x/(1 - x)) / (1 - 2*x).

Original entry on oeis.org

1, 1, 3, 17, 137, 1389, 16819, 236557, 3792753, 68326073, 1366917731, 30074632521, 721798881913, 18766625660197, 525460685327187, 15763716503597189, 504436925448024929, 17150818356045629937, 617428780939911647683, 23462281235407345160833
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 24 2020

Keywords

Crossrefs

Programs

  • Maple
    f:= gfun:-rectoproc({a(n) = -(n - 1)*(5*n - 8)*a(n - 2) + (-3 + 4*n)*a(n - 1) + 2*(n - 1)*(n - 2)^2*a(n - 3),a(0)=1,a(1)=1,a(2)=3},a(n),remember):
    map(f, [$0..30]); # Robert Israel, Jul 28 2020
  • Mathematica
    nmax = 19; CoefficientList[Series[Exp[-x/(1 - x)]/(1 - 2 x), {x, 0, nmax}], x] Range[0, nmax]!
    Table[Sum[Binomial[n, k]^2 k! Subfactorial[n - k], {k, 0, n}], {n, 0, 19}]

Formula

a(n) = Sum_{k=0..n} binomial(n,k)^2 * k! * A000166(n-k).
a(n) = Sum_{k=0..n} binomial(n,k) * k! * 2^k * A293116(n-k).
a(n) ~ n! * exp(-1) * 2^n. - Vaclav Kotesovec, Jan 26 2020
a(n) = (4*n-3)*a(n-1)-(n-1)*(5*n-8)*a(n-2)+2*(n-1)*(n--2)^2*a(n-3). - Robert Israel, Jul 28 2020
Previous Showing 11-20 of 31 results. Next