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 36 results. Next

A046826 Denominator of Sum_{k=0..n} 1/binomial(n,k).

Original entry on oeis.org

1, 1, 2, 3, 3, 5, 60, 105, 35, 63, 630, 1155, 6930, 12870, 24024, 9009, 9009, 17017, 306306, 2909907, 692835, 1322685, 58198140, 111546435, 66927861, 128707425, 371821450, 717084225, 20078358300, 38818159380, 2329089562800, 4512611027925
Offset: 0

Views

Author

Keywords

Examples

			1, 2, 5/2, 8/3, 8/3, 13/5, 151/60, 256/105, 83/35, 146/63, 1433/630, 2588/1155, 15341/6930, 28211/12870, 52235/24024, 19456/9009, 19345/9009, ... = A046825/A046826
		

References

  • See A046825, which is the main entry.

Crossrefs

Programs

  • Magma
    [Denominator((&+[1/Binomial(n,j): j in [0..n]])): n in [0..40]]; // G. C. Greubel, May 24 2021
    
  • Mathematica
    Denominator[Table[Sum[1/Binomial[n,k],{k,0,n}],{n,0,40}]] (* Harvey P. Dale, Nov 05 2011 *)
  • Sage
    [denominator(sum(1/binomial(n,j) for j in (0..n))) for n in (0..40)] # G. C. Greubel, May 24 2021

Formula

a(n) = denominator( A003149(n)/n! ). - G. C. Greubel, May 24 2021

A126674 a(n) = n!*Sum_{j=0..n-1} 2^j/(j+1).

Original entry on oeis.org

0, 1, 4, 20, 128, 1024, 9984, 115968, 1572864, 24477696, 430571520, 8452177920, 183175741440, 4343275192320, 111817607086080, 3105593229312000, 92539365359616000, 2944365169213440000, 99619235621240832000, 3571109329517936640000, 135199252993504444416000, 5390266968989421797376000
Offset: 0

Views

Author

N. J. A. Sloane and Carlo Wood (carlo(AT)alinoe.com), Feb 13 2007

Keywords

Comments

R. J. Mathar's recurrence is correct. a(n) has a new sum term in addition to what a(n-1) has, giving a(n) = n*a(n-1) + 2^(n-1)*(n-1)!. (Cf. A000165 = 2^n*n!.) The same for a(n-1) from a(n-2), and a factor, is 2*(n-1)*(a(n-1) - (n-1)*a(n-2)) = 2^(n-1)*(n-1)! too. Substitute it leaving a(n) in terms of a(n-1) and a(n-2). The recurrence shows the o.g.f. satisfies the differential equation (2*x^2-x+1)*g + 3*x^2*(2*x-1)*g' + 2*x^4*g'' - x = 0. - Kevin Ryde, Jul 11 2019

Crossrefs

Row sums of A126671.

Programs

  • Magma
    [0] cat [Factorial(n)*(&+[2^j/(j+1):j in [0..n-1]]):n in [1..21]]; // Marius A. Burtea, Jul 12 2019
    
  • Maple
    F:=n->add( n!*2^i/(1+i), i=0..n-1);
  • Mathematica
    Table[n!Sum[2^j/(j+1),{j,0,n-1}],{n,0,30}] (* Harvey P. Dale, Jun 14 2017 *)
  • PARI
    a(n) = n!*sum(j=0, n-1, 2^j/(j+1)); \\ Michel Marcus, Jul 12 2019

Formula

From Vladeta Jovovic, Feb 13 2007: (Start)
a(n) = 2^(n-1)*A003149(n-1).
O.g.f.: x*(Sum_{k>=0} k!*(2*x)^k)^2.
E.g.f.: log(1-2*x)/(x-1)/2. (End)
E.g.f.: E(x) = 1/2*log(1 - 2*x)/(x - 1) = x*(1 - x*G(0))/(x-1)/(2*x-1); G(k) = 1 + 2*x*(2*k+1)/(2*k + 3 - 2*x*(k+1)*(2*k+3)/(2*x*(k+1) + (k+2)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Dec 13 2011
G.f.: x*hypergeom([1,1],[],2*x)^2. - Mark van Hoeij, May 16 2013
Conjecture: a(n) + (-3*n+2)*a(n-1) + 2*(n-1)^2*a(n-2) = 0. - R. J. Mathar, May 23 2014
G.f.: x*(1/(1 - 2*x/(1 - 2*x/(1 - 4*x/(1 - 4*x/(1 - 6*x/(1 - 6*x/(1 - ...))))))))^2. - Ilya Gutkovskiy, May 10 2017

A136128 Number of components in all permutations of [1,2,...,n].

Original entry on oeis.org

1, 3, 10, 40, 192, 1092, 7248, 55296, 478080, 4625280, 49524480, 581368320, 7422589440, 102372076800, 1516402944000, 24004657152000, 404347023360000, 7220327288832000, 136227009945600000, 2707657158721536000, 56546150835879936000, 1237826569587277824000
Offset: 1

Views

Author

Emeric Deutsch, Jan 21 2008

Keywords

Examples

			a(3) = 10 because the permutations of [1,2,3], with components separated by /, are 1/2/3, 1/32, 21/3, 231, 312 and 321.
		

References

  • Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 262 (#14).

Crossrefs

Programs

  • Maple
    seq(add(factorial(i)*factorial(n-i),i=0..n-1),n=1..20);
    # second Maple program:
    a:= proc(n) option remember; `if`(n<2, n,
          (a(n-1)+(n-1)!)*(n+1)/2)
        end:
    seq(a(n), n=1..23);  # Alois P. Heinz, Jun 13 2019
  • Mathematica
    nn=20; p=Sum[n!x^n,{n,0,nn}]; Drop[CoefficientList[Series[p(p-1), {x,0,nn}], x], 1] (* Geoffrey Critzer, Apr 20 2012 *)
    Table[(n + 1)! Re[-LerchPhi[2, 1, n + 1]], {n, 1, 20}]  (* Peter Luschny, Jan 04 2018 *)
  • PARI
    a(n) = 2*sum(k=0, (n+1)\2, (4^k-1)*abs(stirling(n+1, 2*k, 1))*bernfrac(2*k)); \\ Seiichi Manyama, Oct 05 2022
    
  • PARI
    a(n) = my(A = 1, B = 1); for(k=1, n, B *= k; A = (n-k+1)*A + B); A-B \\ Mikhail Kurkov, Aug 09 2025
    
  • Python
    def aList(n) -> list[int]:
        f, al, A = 1, 1, [1]
        for i in range(2, n + 1):
            f, al = f * i, (al + f) * (i + 1) >> 1
            A.append(al)
        return A
    print(aList(22))  # Peter Luschny, Aug 09 2025

Formula

a(n) = A003149(n) - n!.
a(n) = A059371(n) + n! (n>=2).
a(n) = Sum_{k=1..n} k*A059438(n,k).
a(n) = Sum_{i=0..n-1} i!*(n-i)!.
a(n) = (n+1)!*(1 + Sum_{j=1..n-1} 2^j/(j+1))/2^n.
a(n) = (n+1)*a(n-1)/2 + (n-1)!*(n+1)/2, a(1)=1.
G.f.: f(f-1), where f(x) = Sum_{j>=0} j!*x^j.
a(n) = (n + 1)!*Re(-LerchPhi(2, 1, n + 1)). - Peter Luschny, Jan 04 2018
D-finite with recurrence: 2*a(n) +(-3*n+1)*a(n-1) +(n^2-3*n+4)*a(n-2) +(n-1)*(n-2)*a(n-3)=0. - R. J. Mathar, Jul 26 2022
a(n) = 2 * Sum_{k=0..floor((n+1)/2)} (4^k-1) * |Stirling1(n+1,2*k)| * Bernoulli(2*k). - Seiichi Manyama, Oct 05 2022
E.g.f.: x/((2-x)*(1-x)) - 2*log(1-x)/((2-x)^2). - Vladimir Kruchinin, Nov 16 2022

A145878 Triangle read by rows: T(n,k) is the number of permutations of [n] having k strong fixed points (0 <= k <= n).

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 3, 2, 0, 1, 14, 6, 3, 0, 1, 77, 29, 9, 4, 0, 1, 497, 160, 45, 12, 5, 0, 1, 3676, 1031, 249, 62, 15, 6, 0, 1, 30677, 7590, 1603, 344, 80, 18, 7, 0, 1, 285335, 63006, 11751, 2214, 445, 99, 21, 8, 0, 1, 2928846, 583160, 97056, 16168, 2865, 552, 119, 24
Offset: 0

Views

Author

Emeric Deutsch, Oct 29 2008

Keywords

Comments

A permutation p of {1,2,...,n} is said to have j as a strong fixed point (splitter) if p(k) < j for k < j and p(k) > j for k > j.
T(n,k) is also the number of permutation graphs on n vertices with exactly k distinct dominating sets of size one. See the link by Theresa Baren, et al. -Daniel A. McGinnis, Oct 16 2018
The values T(k+r,k) are given as a polynomial expression in k when r is fixed, and the polynomial expressions can be calculated recursively. See the link by Theresa Baren, et al. -Daniel A. McGinnis, Oct 19 2018

Examples

			T(5,3) = 4 because we have 1'2'3'54, 1'2'435', 1'324'5' and 213'4'5' (the strong fixed points are marked).
Triangle starts:
   1;
   0,  1;
   1,  0,  1;
   3,  2,  0,  1;
  14,  6,  3,  0,  1;
  77, 29,  9,  4,  0,  1;
		

References

  • Stanley, R. P., Enumerative Combinatorics, Volume 1 (1986), p. 49.

Crossrefs

Row sums gives A000142.

Programs

  • Maple
    n:=7: sfix:=proc(p) local ct,i: ct:= 0: for i to nops(p) do if p[i]=i and `subset`({seq(p[j],j=1..i-1)},{seq(k,k=1..i-1)})=true then ct:=ct+1 else end if end do: ct end proc: with(combinat): P:=permute(n): s:=[seq(sfix(P[j]),j= 1..factorial(n))]: for i from 0 to n do a[i]:=0 end do: for j to factorial(n) do if s[j]=0 then a[0]:=a[0]+1 elif s[j]=1 then a[1]:=a[1]+1 elif s[j]=2 then a[2]:=a[2]+1 elif s[j]=3 then a[3]:=a[3]+1 elif s[j]=4 then a[4]:=a[4]+1 elif s[j]=5 then a[5]:=a[5]+1 elif s[j]=6 then a[6]:=a[6]+1 elif s[j]=7 then a[7]:= a[7]+1 elif s[j]=8 then a[8]:=a[8]+1 elif s[j]=9 then a[9]:=a[9]+1 elif s[j]= 10 then a[10]:=a[10]+1 end if end do: seq(a[k],k=0..n); # yields row m of the triangle, where m is the value of n specified at the beginning of the program
    n:=7: G:=1:for r from n to 2 by -1 do G:=1-(2*r-1)*z-(r^2*z^2)/G:od:G:=1/(1-t*z-z^2/G):
    Gser := simplify(series(G, z = 0, n+1)): for m from 0 to n do seq(coeff(coeff(Gser, z, m), t, k), k = 0 .. m) end do; # based on P. Barry's g.f.; yields sequence in triangular form
  • Mathematica
    nn=10;p=Sum[n!x^n,{n,0,nn}];i=1-1/p;CoefficientList[Series[1/(1-(i-x+y x)),{x,0,nn}],{x,y}]//Grid  (* Geoffrey Critzer, Apr 27 2012 *)

Formula

T(n,0) = A052186(n).
Sum_{k=1..n} T(n,k) = A006932(n).
Sum_{k=0..n} k*T(n,k) = A003149(n-1).
G.f.: 1/(1-xy-x^2/(1-3x-4x^2/(1-5x-9x^2/(1-7x-16x^2/(1-9x-25x^2/(1-... (continued fraction). - Paul Barry, Dec 09 2009
G.f.: 1/(1-(I(x)- x + y*x)) where I(x) is o.g.f. for A003319. - Geoffrey Critzer, Apr 27 2012
From Daniel A. McGinnis, Oct 15 2018: (Start)
T(n,k) = Sum_{i=1..n-k+1} T(n-i,k-1)*T(i-1,0).
T(3+k,k)=3k+3, T(4+k,k)=(k+1)(k+28)/2, T(5+k,k)=(k+1)(3k+77), T(6+k,k)=(k+1)(k^2+110k+2982)/6, T(7+k,k)=(k+1)(3k^2+235k+7352)/2 (previous conjectures).
See the link by Theresa Baren, et al. (End)

A309619 a(n) = Sum_{k=0..floor(n/2)} k! * (n - 2*k)!.

Original entry on oeis.org

1, 1, 3, 7, 28, 128, 754, 5178, 41124, 368220, 3670872, 40290744, 482716896, 6267697920, 87664818960, 1313983544400, 21010949076960, 357007805477280, 6423473819220480, 122003441554176000, 2439346762501367040, 51213306647556506880, 1126446562222595147520
Offset: 0

Views

Author

Vaclav Kotesovec, Aug 10 2019

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 25; CoefficientList[Series[Sum[k!*x^k, {k, 0, nmax}]*Sum[k!*x^(2*k), {k, 0, nmax}], {x, 0, nmax}], x]
    Table[Sum[k!*(n-2*k)!, {k, 0, Floor[n/2]}], {n, 0, 25}]
  • PARI
    a(n) = sum(k=0, n\2, k! * (n - 2*k)!); \\ Michel Marcus, Dec 08 2020

Formula

G.f.: B(x)*B(x^2), where B(x) is g.f. of A000142.
a(n) ~ n! * (1 + 1/n^2 + 1/n^3 + 3/n^4 + 13/n^5 + 57/n^6 + 271/n^7 + 1467/n^8 + 8905/n^9 + 58965/n^10 + ...), for coefficients see A326984.

A324495 Average number of steps t(n) required to get n by repeatedly toggling one of the ceiling(log_2(n)) bits of the binary result of the previous step at a random position with equal probability of the bit positions, starting with all bits 0. The fractional part of t is given separately, i.e., t(n) = a(n) + A324496(n)/A324497(n).

Original entry on oeis.org

1, 3, 4, 7, 9, 9, 10, 15, 18, 18, 20, 18, 20, 20, 21, 31, 37, 37, 40, 37, 40, 40, 41, 37, 40, 40, 41, 40, 41, 41, 42, 63, 74, 74, 78, 74, 78, 78, 80, 74, 78, 78, 80, 78, 80, 80, 82, 74, 78, 78, 80, 78, 80, 80, 82, 78, 80, 80, 82, 80, 82, 82, 83, 127, 147, 147, 153
Offset: 1

Views

Author

Hugo Pfoertner, Mar 05 2019

Keywords

Comments

The problem is related to random walks on the edges of n-dimensional hypercubes.
a(n) is only dependent on the length of the binary representation A070939(n) and on the binary weight A000120(n).

Examples

			a(5) = 9 is given by the sum of occurrence probabilities of toggle chains of even lengths 2*k, multiplied by the lengths.
a(5) = Sum_{k>=1} 4*k*7^(k-1) / 3^(2*k) = 9.
The corresponding simulation results for 10^10 toggle chains are
  2*k Probability P    2*k*P      Cumulated
    2   0.22222334  0.44444668    0.444447
    4   0.17284183  0.69136731    1.135814
    6   0.13442963  0.80657780    1.942392
    8   0.10455718  0.83645746    2.778849
   10   0.08131600  0.81315998    3.592009
   ...
  196   0.00000000  0.00000002    9.000068
.
a(7) = Sum_{k>=1} 2*(2*k+1)*7^(k-1) / 3^(2*k) = 10.
		

Crossrefs

A324496 Numerator of fractional part of average number of bit toggles to reach n as defined in A324495. The denominator is given in A324497.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 1, 2, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 2, 2, 0, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 1, 2, 3, 3, 4, 3, 4, 4, 1, 3, 4, 4, 1, 4, 1, 1, 1, 0, 0, 0, 3, 0, 3, 3, 4, 0, 3, 3, 4, 3, 4, 4, 11, 0, 3, 3, 4, 3, 4
Offset: 1

Views

Author

Hugo Pfoertner, Mar 05 2019

Keywords

Crossrefs

Extensions

a(33)-a(64) from Rainer Rosenthal, Mar 07 2019
More terms from Rainer Rosenthal, Mar 19 2019

A324497 Denominator of fractional part of average number of bit toggles to reach n as defined in A324495. The numerator is given in A324496.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 1, 2, 2, 6, 2, 6, 6, 3, 2, 6, 6, 3, 6, 3, 3, 3, 1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 1, 1, 5, 1, 5, 5, 5, 1, 5, 5, 5, 5, 5, 5, 15, 1, 5, 5, 5, 5, 5
Offset: 1

Views

Author

Hugo Pfoertner, Mar 05 2019

Keywords

Crossrefs

Extensions

a(33)-a(64) from Rainer Rosenthal, Mar 07 2019
More terms from Rainer Rosenthal, Mar 19 2019

A024419 a(n) = n! (1/C(n,0) + 1/C(n,1) + ... + 1/C(n,[ n/2 ])).

Original entry on oeis.org

1, 1, 3, 8, 34, 156, 924, 6144, 48096, 420480, 4134240, 44720640, 530444160, 6824805120, 94787884800, 1412038656000, 22464536371200, 380017225728000, 6811416338227200, 128936055177216000, 2570286167543808000, 53818546503794688000, 1180914445357903872000
Offset: 0

Views

Author

Keywords

Comments

Half-convolution of factorials (A000142) with itself. For the definition of the half-convolution of a sequence with itself see a comment to A201204. - Vladimir Reshetnikov, Oct 05 2016

Examples

			a(3)=3!*(1/1 + 1/3)=6*4/3=8.
		

Crossrefs

Programs

  • Maple
    a:=proc(n) options operator, arrow: factorial(n)*(sum(1/binomial(n, k), k= 0.. floor((1/2)*n))) end proc: seq(a(n), n=0..21); # Emeric Deutsch, Oct 11 2007
  • Mathematica
    Table[Sum[k! (n - k)!, {k, 0, n/2}], {n, 0, 20}] (* Vladimir Reshetnikov, Oct 05 2016 *)
  • PARI
    a(n) = sum(k=0, n\2, k!*(n-k)!); \\ Michel Marcus, Oct 05 2016

Formula

G.f.: (G(x)^2+H(x))/2 where G(x) = Sum_{k>=0} k!*x^k and H(x) = Sum_{k>=0} k!^2*x^(2*k). - Vladeta Jovovic, Sep 22 2007
a(n) = Sum_{k=0..floor(n/2)} k!*(n-k)!. - Vladimir Reshetnikov, Oct 05 2016

Extensions

More terms from Emeric Deutsch, Oct 11 2007

A090595 Fourth column (k=3) of triangle A084938.

Original entry on oeis.org

1, 3, 9, 31, 126, 606, 3428, 22572, 170856, 1467432, 14123808, 150644448, 1763377344, 22466496960, 309371685120, 4577183527680, 72390548206080, 1218507923427840, 21746087150745600, 410094720409651200
Offset: 0

Views

Author

Philippe Deléham, Feb 01 2004

Keywords

Comments

3rd column (k=2): A003149.

Programs

  • GAP
    B:=Binomial;; List([0..20], n-> Sum([0..n], k-> Sum([0..k], j-> Factorial(n)/(B(n,k)*B(k,j)) ))); # G. C. Greubel, Dec 29 2019
  • Magma
    F:=Factorial; B:=Binomial; [ (&+[ (&+[F(n)/(B(k,j)*B(n,k)): j in [0..k]]) : k in [0..n]]): n in [0..20]]; // G. C. Greubel, Dec 29 2019
    
  • Maple
    seq(factorial(n+2)*add(add(Beta(k+2, n-k+1)*Beta(j+1, k-j+1), j=0..k), k=0..n), n = 0..20); # G. C. Greubel, Dec 29 2019
  • Mathematica
    Table[(n+2)!*Sum[Beta[k+2, n-k+1]*Beta[j+1, k-j+1], {k,0,n}, {j,0,k}], {n,0,20}] (* G. C. Greubel, Dec 29 2019 *)
  • PARI
    vector(21, n, my(b=binomial); sum(k=0,n-1, sum(j=0,k, (n-1)!/(b(k,j)* b(n-1, k)) ))) \\ G. C. Greubel, Dec 29 2019
    
  • Sage
    [ factorial(n+2)*sum(sum(beta(k+2,n-k+1)*beta(j+1,k-j+1) for j in (0..k)) for k in (0..n)) for n in (0..20)] # G. C. Greubel, Dec 29 2019
    

Formula

a(n) = Sum_{k=0..n} A003149(k)*(n-k)!.
G.f.: (Sum_{k>=0} k!*x^k)^3.
a(n) ~ 3 * n!. - Vaclav Kotesovec, Jun 25 2019
From G. C. Greubel, Dec 29 2019: (Start)
a(n) = (n+2)!*Sum_{k=0..n} Sum_{j=0..n} B(k+2, n-k+1)*B(j+1,k-j+1), where B(x,y) is the Beta function.
a(n) = Sum_{k=0..n} Sum_{j=0..k} n!/(binomial(n,k)*binomial(k,j)). (End)
Previous Showing 11-20 of 36 results. Next