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

A177737 Partial sums of A046878.

Original entry on oeis.org

0, 1, 2, 7, 9, 17, 30, 181, 213, 296, 369, 1802, 2449, 17790, 46001, 56448, 57664, 77009, 95190, 746935, 2289093, 3753007, 6539606, 128829523, 158059067, 298060788, 432415361, 1207300530, 1953285227, 43665199740, 124195273633
Offset: 0

Views

Author

Jonathan Vos Post, May 12 2010

Keywords

Crossrefs

Formula

a(n) = Sum_{i=0..n} A046878(i).

A003149 a(n) = Sum_{k=0..n} k!*(n - k)!.

Original entry on oeis.org

1, 2, 5, 16, 64, 312, 1812, 12288, 95616, 840960, 8254080, 89441280, 1060369920, 13649610240, 189550368000, 2824077312000, 44927447040000, 760034451456000, 13622700994560000, 257872110354432000, 5140559166898176000, 107637093007589376000, 2361827297364885504000
Offset: 0

Views

Author

Keywords

Comments

From Michael Somos, Feb 14 2002: (Start)
The sequence is the resistance between opposite corners of an (n+1)-dimensional hypercube of unit resistors, multiplied by (n+1)!.
The resistances for n+1 = 1,2,3,... are 1, 1, 5/6, 2/3, 8/15, 13/30, 151/420, 32/105, 83/315, 73/315, 1433/6930, ... (see A046878/A046879). (End)
Number of {12,21*,2*1}-avoiding signed permutations in the hyperoctahedral group.
a(n) is the sum of the reciprocals of the binomial coefficients C(n,k), multiplied by n!; example: a(4) = 4!*(1/1 + 1/4 + 1/6 + 1/4 + 1/1) = 64. - Philippe Deléham, May 12 2005
a(n) is the number of permutations on [n+1] that avoid the pattern 13-2|. The absence of a dash between 1 and 3 means the "1" and "3" must be consecutive in the permutation; the vertical bar means the "2" must occur at the end of the permutation. For example, 24153 fails to avoid this pattern: 243 is an offending subpermutation. - David Callan, Nov 02 2005
n!/a(n) is the probability that a random walk on an (n+1)-dimensional hypercube will visit the diagonally opposite vertex before it returns to its starting point. 2^n*a(n)/n! is the expected length of a random walk from one vertex of an (n+1)-dimensional hypercube to the diagonally opposite vertex (a walk which may include one or more passes through the starting point). These "random walk" examples are solutions to IBM's "Ponder This" puzzle for April, 2006. - Graeme McRae, Apr 02 2006
a(n) is the number of strong fixed points in all permutations of {1,2,...,n+1} (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). Example: a(2)=5 because the permutations of {1,2,3}, with marked strong fixed points, are: 1'2'3', 1'32, 312, 213', 231 and 321. - Emeric Deutsch, Oct 28 2008
Coefficients in the asymptotic expansion of exp(-2*x)*Ei(x)^2 for x -> inf, where Ei(x) is the exponential integral. - Vladimir Reshetnikov, Apr 24 2016

References

  • I. P. Goulden and D. M. Jackson, Combinatorial Enumeration, Wiley, N.Y., 1983, (1.1.11 b, p.342).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • R. P. Stanley, Enumerative Combinatorics, Volume 1 (1986), p. 49. [From Emeric Deutsch, Oct 28 2008]

Crossrefs

Cf. A052186, A006932, A145878. - Emeric Deutsch, Oct 28 2008
Cf. A324495, A324496, A324497 (problem similar to the random walks on the hypercube).

Programs

  • GAP
    F:=Factorial;; List([0..20], n-> Sum([0..n], k-> F(k)*F(n-k)) ); # G. C. Greubel, Dec 29 2019
    
  • Magma
    F:=Factorial; [ (&+[F(k)*F(n-k): k in [0..n]]): n in [0..20]]; // G. C. Greubel, Dec 29 2019
    
  • Maple
    seq( add(k!*(n-k)!, k=0..n), n=0..20); # G. C. Greubel, Dec 29 2019
    # second Maple program:
    a:= proc(n) option remember; `if`(n<2, n+1,
          ((3*n+1)*a(n-1)-n^2*a(n-2))/2)
        end:
    seq(a(n), n=0..22);  # Alois P. Heinz, Aug 08 2025
  • Mathematica
    Table[Sum[k!(n-k)!,{k,0,n}],{n,0,20}] (* Harvey P. Dale, Mar 28 2012 *)
    Table[(n+1)!/2^n*Sum[2^k/(k+1),{k,0,n}],{n,0,20}] (* Vaclav Kotesovec, Oct 27 2012 *)
    Round@Table[-2 (n+1)! Re[LerchPhi[2, 1, n+2]], {n, 0, 20}] (* Vladimir Reshetnikov, Nov 12 2015 *)
    Table[(n+1)!*Sum[Binomial[n+1, 2*j+1]/(2*j+1), {j, 0, n}]/2^n, {n, 0, 20}] (* Vaclav Kotesovec, Dec 04 2015 *)
    Series[Exp[-2x] ExpIntegralEi[x]^2, {x, Infinity, 20}][[3]] (* Vladimir Reshetnikov, Apr 24 2016 *)
    Table[2*(-1)^n * Sum[(2^k - 1) * StirlingS1[n, k] * BernoulliB[k], {k, 0, n}], {n, 1, 25}] (* Vaclav Kotesovec, Oct 04 2022 *)
  • PARI
    a(n)=sum(k=0,n,k!*(n-k)!)
    
  • PARI
    a(n)=if(n<0,0,(n+1)!*polcoeff(log(1-x+x^2*O(x^n))/(x/2-1),n+1))
    
  • PARI
    a(n) = my(A = 1, B = 1); for(k=1, n, B *= k; A = (n-k+1)*A + B); A \\ Mikhail Kurkov, Aug 08 2025
    
  • Python
    def a(n: int) -> int:
        if n < 2: return n + 1
        app, ap = 1, 2
        for i in range(2, n + 1):
            app, ap = ap, ((3 * i + 1) * ap - (i * i) * app) >> 1
        return ap
    print([a(n) for n in range(23)])  # Peter Luschny, Aug 08 2025
  • Sage
    f=factorial; [sum(f(k)*f(n-k) for k in (0..n)) for n in (0..20)] # G. C. Greubel, Dec 29 2019
    

Formula

a(n) = n! + ((n+1)/2)*a(n-1), n >= 1. - Leroy Quet, Sep 06 2002
a(n) = ((3n+1)*a(n-1) - n^2*a(n-2))/2, n >= 2. - David W. Wilson, Sep 06 2002; corrected by N. Sato, Jan 27 2010
G.f.: (Sum_{k>=0} k!*x^k)^2. - Vladeta Jovovic, Aug 30 2002
E.g.f: log(1-x)/(x/2 - 1) if offset 1.
Convolution of A000142 [factorial numbers] with itself. - Ross La Haye, Oct 29 2004
a(n) = Sum_{k=0..n+1} k*A145878(n+1,k). - Emeric Deutsch, Oct 28 2008
a(n) = A084938(n+2,2). - Philippe Deléham, Dec 17 2008
a(n) = 2*Integral_{t=0..oo} Ei(t)*exp(-2*t)*t^(n+1) where Ei is the exponential integral function. - Groux Roland, Dec 09 2010
Empirical: a(n-1) = 2^(-n)*(A103213(n) + n!*H(n)) with H(n) harmonic number of order n. - Groux Roland, Dec 18 2010; offset fixed by Vladimir Reshetnikov, Apr 24 2016
O.g.f.: 1/(1-I(x))^2 where I(x) is o.g.f. for A003319. - Geoffrey Critzer, Apr 27 2012
a(n) ~ 2*n!. - Vaclav Kotesovec, Oct 04 2012
a(n) = (n+1)!/2^n * Sum_{k=0..n} 2^k/(k+1). - Vaclav Kotesovec, Oct 27 2012
E.g.f.: 2/((x-1)*(x-2)) + 2*x/(x-2)^2*G(0) where G(k) = 1 + x*(2*k+1)/(2*(k+1) - 4*x*(k+1)^2/(2*x*(k+1) + (2*k+3)/G(k+1) )); (recursively defined continued fraction). - Sergei N. Gladkovskii, Dec 14 2012
a(n) = 2 * n! * (1 + Sum_{k>=1} A005649(k-1)/n^k). - Vaclav Kotesovec, Aug 01 2015
From Vladimir Reshetnikov, Nov 12 2015: (Start)
a(n) = -(n+1)!*Re(Beta(2; n+2, 0))/2^(n+1), where Beta(z; a, b) is the incomplete Beta function.
a(n) = -2*(n+1)!*Re(LerchPhi(2, 1, n+2)), where LerchPhi(z, s, a) is the Lerch transcendent. (End)
a(n) = (n+1)!*(H(n+1) + (n+1)*hypergeom([1, 1, -n], [2, 2], -1))/2^(n+1), where H(n) is the harmonic number. - Vladimir Reshetnikov, Apr 24 2016
Expansion of square of continued fraction 1/(1 - x/(1 - x/(1 - 2*x/(1 - 2*x/(1 - 3*x/(1 - 3*x/(1 - ...))))))). - Ilya Gutkovskiy, Apr 19 2017
a(n) = Sum_{k=0..n+1} (-1)^(n-k)*A226158(k)*Stirling1(n+1, k). - Mélika Tebni, Feb 22 2022
E.g.f.: x/((1-x)*(2-x))-(2*log(1-x))/(2-x)^2+1/(1-x). - Vladimir Kruchinin, Dec 17 2022

Extensions

More terms from Michel ten Voorde, Apr 11 2001

A046825 Numerator of Sum_{k=0..n} 1/binomial(n,k).

Original entry on oeis.org

1, 2, 5, 8, 8, 13, 151, 256, 83, 146, 1433, 2588, 15341, 28211, 52235, 19456, 19345, 36362, 651745, 6168632, 1463914, 2786599, 122289917, 233836352, 140001721, 268709146, 774885169, 1491969394, 41711914513, 80530073893
Offset: 0

Views

Author

Keywords

Comments

The term a(12)=15341 is divisible by 23^2. Is there another term a(n) divisible by the square of a prime p larger than n+1? - M. F. Hasler, Jul 17 2012

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

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 294, Problem 7.15.
  • R. L. Graham, D. E. Knuth, O. Patashnik; Concrete Mathematics, Addison-Wesley, Reading (1994) 2nd Ed. Exercise 5.100.
  • G. Letac, Problèmes de probabilités, Presses Universitaires de France (1970), p. 14.
  • F. Nedemeyer and Y. Smorodinsky, Resistances in the multidimensional cube, Quantum 7:1 (1996) 12-15 and 63.

Crossrefs

Programs

  • Magma
    [Numerator((&+[1/Binomial(n,j): j in [0..n]])): n in [0..40]]; // G. C. Greubel, May 24 2021
    
  • Mathematica
    Numerator/@Table[Sum[1/Binomial[n,k],{k,0,n}],{n,0,40}]  (* Harvey P. Dale, Apr 21 2011 *)
  • PARI
    P=1;vector(30,n,numerator(P)+0*P=P/2/n*(n+1)+1) \\ M. F. Hasler, Jul 17 2012
    
  • PARI
    A046825(n)=numerator(sum(k=0,n,1/binomial(n,k))) \\ M. F. Hasler, Jul 19 2012
    
  • Sage
    [numerator(sum(1/binomial(n,j) for j in (0..n))) for n in (0..40)] # G. C. Greubel, May 24 2021

Formula

Let P(n) = (1/n) * Sum_{k=0..n-1} 1/binomial(n-1, k) = A046878(n)/A046879(n) = A046825(n-1)/(n*A046826(n-1)): { 0, 1, 1, 5/6, 2/3, 8/15, ...}. Then P(n) = 2^(-n) * Sum_{k=1..n} 2^k / k = 2^(-n+1) * Sum_{k odd} binomial(n, k)/k; P(0) = 0, P(n) = P(n-1)/2 + 1/n. - Torsten Sillke (Torsten.Sillke(AT)uni-bielefeld.de)
G.f. for P(n): (2*log(1-z))/(-2+z). - Wouter Meeussen
P(n) = 2^(-n) * Sum_{k=1..n} (binomial(n,k) + 1)/k.
a(n) = numerator( A003149(n)/n! ). - G. C. Greubel, May 24 2021

Extensions

References entries (Comtet, Graham et al., Letac, Nedemeyer) and Links entries (Singmaster, Sury) from Torsten.Sillke(AT)uni-bielefeld.de

A046879 Denominator of (1/n)*Sum_{k=0..n-1} 1/binomial(n-1,k) for n>0 else 1.

Original entry on oeis.org

1, 1, 1, 6, 3, 15, 30, 420, 105, 315, 315, 6930, 3465, 90090, 180180, 72072, 9009, 153153, 153153, 5819814, 14549535, 14549535, 29099070, 1338557220, 334639305, 1673196525, 1673196525, 10039179150, 10039179150, 582272390700, 1164544781400
Offset: 0

Views

Author

Keywords

Comments

For n>=1 a(n) is the denominator of (1/2^n)*Sum_{k=1..n} 2^k/k. - Groux Roland, Jan 13 2009

Crossrefs

See A046825, the main entry for this sequence. Cf. A046878.

Programs

  • Maple
    a := n -> -2*LerchPhi(2,1,n+1)-I*Pi/2^n:
    seq(denom(simplify(a(n))),n=0..30); # Peter Luschny, Nov 20 2015
  • Mathematica
    Denominator[Simplify[-2*LerchPhi[2, 1, # + 1] - I*Pi/2^#]] & /@
    Range[0, 100] (* Julien Kluge, Jul 21 2016 *)
  • Maxima
    a(n):=if n=0 then 1 else denom((-1)^(n-1)/(n-1)!*sum(2^k*bern(k)*(stirling1(n-1,k)),k,0,n-1)); /* Vladimir Kruchinin, Nov 20 2015 */
    
  • PARI
    vector(30, n, n--; denominator((1/2^n)*sum(k=1, n, 2^k/k))) \\ Altug Alkan, Nov 20 2015

Formula

a(n) = denominator((-1)^(n-1)/(n-1)!*Sum_{k=0..n-1} 2^k*bern(k) * stirling1(n-1,k)), n>0, a(0)=1. - Vladimir Kruchinin, Nov 20 2015
a(n) = denominator(-2*LerchPhi(2,1,n+1)-i*Pi/2^n). - Peter Luschny, Nov 20 2015

A212045 Numerators in the resistance triangle: T(k,n)=b, where b/c is the resistance distance R(k,n) for k resistors in an n-dimensional cube.

Original entry on oeis.org

1, 3, 1, 7, 3, 5, 15, 7, 61, 2, 31, 15, 241, 25, 8, 21, 31, 131, 101, 137, 13, 127, 21, 12, 7, 2381, 343, 151, 255, 127, 2105, 167, 10781, 2033, 32663, 32, 511, 255, 16531, 929, 42061, 9383, 84677, 2357, 83, 1023, 511, 5231, 7387, 74189, 1771, 12419
Offset: 1

Views

Author

Peter J. C. Moses, Apr 28 2012

Keywords

Comments

The term "resistance distance" for electric circuits was in use years before it was proved to be a metric (on edges of graphs). The historical meaning has been described thus: "one imagines unit resistors on each edge of a graph G and takes the resistance distance between vertices i and j of G to be the effective resistance between vertices i and j..." (from Klein, 2002; see the References). Let R(k,n) denote the resistance distance for k resistors in an n-dimensional cube (for details, see Example and References). Then
R(k,n)=A212045(k,n)/A212046(k,n). Moreover,
A212045(1,n)=A090633(n), A212045(n,n)=A046878(n),
A212046(1,n)=A090634(n), A212046(n,n)=A046879(n).

Examples

			First six rows of A212045/A212046:
1
3/4 .... 1
7/12 ... 3/4 .... 5/6
15/32 .. 7/12 ... 61/96 ... 2/3
31/80 .. 15/32 .. 241/480 . 25/48 ... 8/15
21/64 .. 31/80 .. 131/320 . 101/240 . 137/320 . 13/30
The resistance distances for n=3 (the ordinary cube) are 7/12, 3/4, and 5/6, so that row 3 of the triangle of numerators is (7, 3, 5).  For the corresponding electric circuit, suppose X is a vertex of the cube. The resistance across any one of the 3 edges from X is 7/12 ohm; the resistance across any two adjoined edges (i.e., a diagonal of a face of the cubes) is 3/4 ohm; the resistance across and three adjoined edges (a diagonal of the cube) is 5/6 ohm.
		

References

  • F. Nedemeyer and Y. Smorodinsky, Resistances in the multidimensional cube, Quantum 7:1 (1996) 12-15 and 63.

Crossrefs

Programs

  • Mathematica
    R[0, n_] := 0; R[1, n_] := (2 - 2^(1 - n))/n;
    R[k_, n_] := R[k, n] = ((k - 1) R[k - 2, n] - n R[k - 1, n] + 2^(1 - n))/(k - n - 1)
    t = Table[R[k, n], {n, 1, 11}, {k, 1, n}]
    Flatten[Numerator[t]]    (* A212045 *)
    Flatten[Denominator[t]]  (* A212046 *)
    TableForm[Numerator[t]]
    TableForm[Denominator[t]]

Formula

A212045(n)/A212046(n) is the rational number R(k, n) =
[(k-1)*R(k-2,n)-n*R(k-1,n)+2^(1-n)]/(k-n-1), for n>=1, k>=1.

A212046 Denominators in the resistance triangle: T(k,n)=b, where b/c is the resistance distance R(k,n) for k resistors in an n-dimensional cube.

Original entry on oeis.org

1, 4, 1, 12, 4, 6, 32, 12, 96, 3, 80, 32, 480, 48, 15, 64, 80, 320, 240, 320, 30, 448, 64, 35, 20, 6720, 960, 420, 1024, 448, 7168, 560, 35840, 6720, 107520, 105, 2304, 1024, 64512, 3584, 161280, 35840, 322560, 8960, 315, 5120, 2304, 23040, 32256
Offset: 1

Views

Author

Peter J. C. Moses, Apr 30 2012

Keywords

Comments

The term "resistance distance" for electric circuits was in use years before it was proved to be a metric (on edges of graphs). The historical meaning has been described thus: "one imagines unit resistors on each edge of a graph G and takes the resistance distance between vertices i and j of G to be the effective resistance between vertices i and j..." (from Klein, 2002; see the References). Let R(k,n) denote the resistance distance for k resistors in an n-dimensional cube (for details, see Example and References). Then
R(k,n)=A212045(k,n)/A212046(k,n). Moreover,
A212045(1,n)=A090633(n), A212045(n,n)=A046878(n),
A212046(1,n)=A090634(n), A212046(n,n)=A046879(n).

Examples

			First six rows of A212045/A212046:
  1
  3/4 .... 1
  7/12 ... 3/4 .... 5/6
  15/32 .. 7/12 ... 61/96 ... 2/3
  31/80 .. 15/32 .. 241/480 . 25/48 ... 8/15
  21/64 .. 31/80 .. 131/320 . 101/240 . 137/320 . 13/30
The resistance distances for n=3 (the ordinary cube) are 7/12, 3/4, and 5/6, so that row 3 of the triangle of numerators is (7, 3, 5).  For the corresponding electric circuit, suppose X is a vertex of the cube.  The resistance across any one of the 3 edges from X is 7/12 ohm; the resistance across any two adjoined edges (i.e., a diagonal of a face of the cubes) is 3/4 ohm; the resistance across and three adjoined edges (a diagonal of the cube) is 5/6 ohm.
		

References

  • F. Nedemeyer and Y. Smorodinsky, Resistances in the multidimensional cube, Quantum 7:1 (1996) 12-15 and 63.

Crossrefs

Programs

  • Mathematica
    R[0, n_] := 0; R[1, n_] := (2 - 2^(1 - n))/n;
    R[k_, n_] := R[k, n] = ((k - 1) R[k - 2, n] - n R[k - 1, n] + 2^(1 - n))/(k - n - 1)
    t = Table[R[k, n], {n, 1, 11}, {k, 1, n}]
    Flatten[Numerator[t]]    (* A212045 *)
    Flatten[Denominator[t]]  (* A212046 *)
    TableForm[Numerator[t]]
    TableForm[Denominator[t]]

Formula

A212045(n)/A212046(n) is the rational number R(k, n) =
[(k-1)*R(k-2,n)-n*R(k-1,n)+2^(1-n)]/(k-n-1), for n>=1, k>=1.

A174662 Partial sums of A003149.

Original entry on oeis.org

1, 3, 8, 24, 88, 400, 2212, 14500, 110116, 951076, 9205156, 98646436, 1159016356, 14808626596, 204358994596, 3028436306596, 47955883346596, 807990334802596, 14430691329362596, 272302801683794596, 5412861968581970596
Offset: 0

Views

Author

Jonathan Vos Post, Nov 30 2010

Keywords

Comments

Total resistance of a circuit whose n-th component is between opposite corners of an n-dimensional hypercube of unit resistors, multiplied by n!. The only prime in the sequence is 3. The subsequence of squares begins 1, 400, 9205156 = 2^2 * 37^2 * 41^2.

Examples

			a(5) = 1 + 2 + 5 + 16 + 64 + 312 = 400 = 2^4 * 5^2.
		

Crossrefs

Formula

a(n) = Sum_{i=0..n} Sum_{k=0..i} k!*(i-k)!.

Extensions

Offset set to 0 by Alois P. Heinz, Jun 28 2017
Showing 1-7 of 7 results.