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.

User: Vladimir Shevelev

Vladimir Shevelev's wiki page.

Vladimir Shevelev has authored 1326 sequences. Here are the ten most recent ones:

A294811 Let b(n) be the number of permutations {c_1..c_n} of {1..n} for which c_1 - c_2 + ... + (-1)^(n-1)*c_n are triangular numbers (A000217). Then a(n) = b(n)/A010551(n).

Original entry on oeis.org

1, 1, 1, 1, 2, 4, 6, 11, 16, 30, 48, 97, 157, 322, 524, 1077, 1777, 3684, 6157, 12876, 21684, 45520, 77212, 162533, 277608, 585993, 1006784, 2129433, 3677453, 7788711, 13514487, 28654668, 49933938, 105964856, 185377690, 393631445, 691101516, 1468137470
Offset: 0

Author

Keywords

Comments

All terms are positive integers (for a proof, cf. comment in A293984). Note that a(1), a(2), a(3), a(4) remain the same if in the definition the triangular numbers are replaced by k-gonal numbers for k >= 5.

Examples

			Let n=3. For a permutation C={c_1,c_2,c_3}, set s = s(C) = c_1 - c_2 + c_3. We have the permutations:
1,2,3; s=2
1,3,2; s=0
2,1,3; s=4
2,3,1; s=0
3,1,2; s=4
3,2,1; s=2
Here there are 2 permutations for which {s} are triangular numbers (when s = 0). Further, since A010551(3) = 2, then a(3) = 1.
Let n=4. For a permutation C={c_1,c_2,c_3,c_4}, set s = s(C) = c_1 - c_2 + c_3 - c_4. We have the permutations:
1,2,3,4; s=-2
1,3,2,4; s=-4
2,1,3,4; s=0
2,3,1,4; s=-4
3,1,2,4; s=0
3,2,1,4; s=-2
1,2,4,3; s=0
1,3,4,2; s=0
2,1,4,3; s=2
2,3,4,1; s=2
3,1,4,2; s=4
3,2,4,1; s=4
1,4,2,3; s=-4
1,4,3,2; s=-2
2,4,1,3; s=-4
2,4,3,1; s=0
3,4,1,2; s=-2
3,4,2,1; s=0
4,1,2,3; s=2
4,1,3,2; s=4
4,2,1,3; s=0
4,2,3,1; s=4
4,3,1,2; s=0
4,3,2,1; s=2
Here there are 8 permutations for which {s} are triangular numbers (when s = 0). Further, since A010551(4) = 4, then a(4) = 8/4 = 2.
		

Crossrefs

Programs

  • Maple
    b:= proc(p, m, s) option remember; (n-> `if`(n=0, `if`(issqr(8*s+1), 1, 0),
          `if`(p>0, b(p-1, m, s+n), 0)+`if`(m>0, b(p, m-1, s-n), 0)))(p+m)
        end:
    a:= n-> (t-> b(n-t, t, 0))(iquo(n, 2)):
    seq(a(n), n=0..40);  # Alois P. Heinz, Sep 17 2020
  • Mathematica
    polyQ[order_,n_]:=If[n==0,True,IntegerQ[(#-4+Sqrt[(#-4)^2+8 n (#-2)])/(2 (#-2))]&[order]];(*is a number polygonal?*)
    Map[Total,Table[
    possibleSums=Range[1/2-(-1)^n/2-Floor[n/2]^2,Floor[(n+1)/2]^2];
    filteredSums=Select[possibleSums,polyQ[3,#]&&#>-1&];
    positions=Map[Flatten[{#,Position[possibleSums,#,1]-1}]&,filteredSums];
    Map[SeriesCoefficient[QBinomial[n,Floor[(n+1)/2],q],{q,0,#[[2]]/2}]&,positions],{n,25}]] (* Peter J. C. Moses, Jan 02 2018 *)

Extensions

a(0)=1 prepended by Alois P. Heinz, Sep 17 2020

A294812 Let b(n) be the number of permutations {c_1..c_n} of {1..n} for which c_1 - c_2 + ... + (-1)^(n-1)*c_n are pentagonal numbers (A000326). Then a(n) = b(n)/A010551(n).

Original entry on oeis.org

1, 1, 1, 2, 4, 5, 6, 10, 23, 38, 70, 110, 196, 346, 759, 1250, 2313, 3982, 8433, 14520, 29437, 50466, 102830, 179587, 376439, 654374, 1343540, 2352149, 4916286, 8654120, 18065200, 31783592, 66233160, 117371504, 246610521, 436972949, 913862320, 1626523783
Offset: 1

Author

Keywords

Comments

All terms are positive integers (for a proof, cf. comment in A293984).
Note that a(1), a(2), a(3), a(4) remain the same, if in the definition the pentagonal numbers are replaced by k-gonal numbers for k >= 3 other than k=4.

Crossrefs

Programs

  • Mathematica
    polyQ[order_,n_]:=If[n==0,True,IntegerQ[(#-4+Sqrt[(#-4)^2+8 n (#-2)])/(2 (#-2))]&[order]];(*is a number polygonal?*)
    Map[Total,Table[
    possibleSums=Range[1/2-(-1)^n/2-Floor[n/2]^2,Floor[(n+1)/2]^2];
    filteredSums=Select[possibleSums,polyQ[5,#]&&#>-1&];
    positions=Map[Flatten[{#,Position[possibleSums,#,1]-1}]&,filteredSums];
    Map[SeriesCoefficient[QBinomial[n,Floor[(n+1)/2],q],{q,0,#[[2]]/2}]&,positions],{n,25}]] (* Peter J. C. Moses, Jan 02 2018 *)

A297003 a(n) = 2^(n-1), n=1,2,3; for n >= 4, a(n) is the number of the previous terms dividing n.

Original entry on oeis.org

1, 2, 4, 3, 1, 4, 2, 6, 3, 4, 2, 11, 2, 6, 4, 10, 2, 11, 2, 13, 4, 10, 2, 18, 2, 11, 4, 16, 2, 17, 2, 19, 7, 13, 3, 24, 2, 14, 7, 21, 2, 23, 2, 24, 5, 16, 2, 31, 4, 19, 6, 25, 2, 24, 6, 27, 7, 17, 2, 35, 2, 20, 9, 28, 5, 29, 2, 29, 6, 29, 2, 41, 2, 22, 8, 31
Offset: 1

Author

Vladimir Shevelev, Dec 23 2017

Keywords

Examples

			1-3) a(1)=1, a(2)=2 a(3)=4 by the definition;
4) Let n=4. From the previous terms {1,2,4} everyone divides 4, so a(4)=3;
5) Let n=5. From the previous terms {1,2,4,3} only 1 divides 5. So a(5)=1;
6) Let n=6. From the previous terms {1,2,4,3,1} exactly four divide 6. So a(6)=4; etc.
		

Crossrefs

Cf. A088167.

Programs

  • Mathematica
    first[n_] := Fold[Append[#1, Count[#1, k_ /; Divisible[#2, k]]] &,
      2^Range[0, Min[n - 1, 2]], Range[4, n]] (* Michael De Vlieger, Dec 23 2017 *)
  • PARI
    first(n) = my(res = vector(n), c = 0); for(x = 1, min(n, 3), res[x] = 1<<(x-1)); for(x=4, n, for(k=1, x-1, if(x%res[k]==0, c++)); res[x] = c; c = 0); res \\ Iain Fox, Dec 23 2017
    
  • Sage
    def A297003_list(leng):
        L = [1, 2, 4]
        if leng < 4: return L[0:leng]
        for n in (4..leng) :
            count = 0
            for l in L: count += int(l.divides(n))
            L.append(count)
        return L
    print(A297003_list(76)) # Peter Luschny, Dec 24 2017

Formula

a(p) = 2, where p is prime, other than 3 and 5.

Extensions

More terms from Peter J. C. Moses, Dec 23 2017

A295872 Decimal expansion of the first Ramanujan trigonometric constant (negated).

Original entry on oeis.org

7, 1, 7, 5, 1, 5, 0, 7, 9, 6, 4, 9, 9, 3, 9, 9, 3, 5, 1, 2, 0, 9, 5, 0, 5, 5, 9, 1, 7, 7, 9, 8, 6, 1, 1, 2, 1, 0, 8, 4, 5, 7, 6, 0, 1, 1, 5, 5, 2, 5, 0, 5, 7, 2, 1, 8, 3, 3, 0, 2, 8, 3, 0, 0, 2, 7, 9, 8, 1, 4, 6, 5, 0
Offset: 0

Author

Vladimir Shevelev, Dec 09 2017

Keywords

Comments

According to the famous Ramanujan identity, the constant r_1 has a representation: r_1 = Sum_{i = 1..3} (cos(2^i*Pi/7))^(1/3) (see formula). This identity was submitted in 1914 by Ramanujan as a problem (cf. [Berndt, Y. S. Choi, S. Y. Kang]). For proof, see first [V. Shevelev].

Examples

			r_1 =-0.7175150796499399351209505591779861121084576011552505721833028300279814650...
		

References

  • B. Bajorska-Harapinska, M. Pleszczynski, D. Slota and R. Witula, A few properties of Ramanujan cubic polynomials and Ramanujan cubic polynomials of the second kind, in book: Selected Problems on Experimental Mathematics, Gliwice 2017, pp. 181-200.
  • B. C. Berndt, Y. S. Choi, and S. Y. Kang, The problems submitted by Ramanujan to the Journal of Indian Math. Soc. in: Continued fractions, Contemporary Math., 236 (1999), 15-56 (see Q524, JIMS VI, 1914).
  • S. Ramanujan, Notebooks (2 volumes), Tata Institute of Fundamental Research, Bombay, 1957.

Programs

  • Maple
    use RealDomain in solve(4*x^9 - 30*x^6 + 75*x^3 + 32 = 0) end use:
    evalf(%, 79); # Peter Luschny, Dec 13 2017
  • Mathematica
    RealDigits[(-(5 - 3*7^(1/3))/2)^(1/3), 10, 111][[1]] (* Robert G. Wilson v, Dec 13 2017 *)
  • PARI
    -((3*7^(1/3)-5)/2)^(1/3) \\ Michel Marcus, Dec 10 2017

Formula

r_1 = ((5 - 3*7^(1/3))/2)^(1/3).

Extensions

More terms from Michel Marcus, Dec 09 2017

A296448 Decimal expansion of the second Ramanujan trigonometric constant r_2.

Original entry on oeis.org

4, 9, 3, 4, 1, 4, 6, 2, 5, 9, 1, 8, 7, 8, 5, 6, 6, 4, 4, 2, 5, 6, 7, 2, 7, 5, 3, 3, 9, 3, 6, 7, 3, 4, 2, 6, 4, 3, 3, 7, 3, 7, 4, 7, 8, 3, 9, 9, 3, 7, 5, 0, 1, 8, 6, 3, 6, 6, 6, 4, 1, 7, 9, 5, 4, 9, 4, 7, 6, 7, 5, 8, 7, 8, 7, 8, 5, 9, 1, 8, 0, 5, 7, 4, 3, 2, 5, 1, 6, 9, 4, 1, 2, 9, 4, 5, 9, 7, 2, 4, 2, 8, 4, 0, 9
Offset: 0

Author

Vladimir Shevelev, Dec 13 2017

Keywords

Comments

According to the famous Ramanujan identity, the constant r_2 has a representation: r_2 = Sum_{i = 1..3} (cos(2^i*Pi/9))^(1/3) (see formula). This identity was submitted in 1914 by Ramanujan as a problem (cf. [Berndt, Y. S. Choi, S. Y. Kang]). For proof, see first [V. Shevelev].

Examples

			0.4934146259187856644256727533936734264337374783993750186366641795494767587...
		

References

  • B. Bajorska-Harapinska, M. Pleszczynski, D. Slota and R. Witula, A few properties of Ramanujan cubic polynomials and Ramanujan cubic polynomials of the second kind, in book: Selected Problems on Experimental Mathematics, Gliwice 2017, pp. 181-200.
  • S. Ramanujan, Notebooks (2 volumes), Tata Institute of Fundamental Research, Bombay, 1957.

Crossrefs

Cf. A295872.

Programs

  • Maple
    use RealDomain in solve(8*x^9 + 72*x^6 + 216*x^3 - 27 = 0) end use:
    evalf(%, 85); # Peter Luschny, Dec 13 2017
  • Mathematica
    RealDigits[(3/2 (-2 + 3^(2/3)))^(1/3), 10, 111][[1]] (* Robert G. Wilson v, Dec 13 2017 *)
  • PARI
    ((3*9^(1/3) - 6)/2)^(1/3) \\ Michel Marcus, Dec 13 2017

Formula

r_2 = (3/2 (3^(2/3) -2))^(1/3)

Extensions

More terms from Michel Marcus, Dec 13 2017

A293783 Triangle of numbers of squares {i^2}, i = 0,1..ceiling(n/2), in permutations of {1..n} in A293857.

Original entry on oeis.org

0, 1, 0, 1, 2, 0, 2, 8, 0, 4, 0, 24, 0, 12, 0, 108, 0, 36, 576, 0, 720, 0, 144, 4608, 0, 4032, 0, 576, 0, 31680, 0, 31680, 0, 2880, 0, 288000, 0, 201600, 0, 14400, 2505600, 0, 2764800, 0, 1987200, 0, 86400, 30067200, 0, 28512000, 0, 14515200, 0, 518400
Offset: 1

Author

Keywords

Comments

From Shevelev's comment in A008794 it follows that the last entries of rows, corresponding to the maximal possible i^2, form sequence A010551, n >= 1. Also note that the last entry of each row is the gcd of all its entries (for a proof see comment in A293857). - Vladimir Shevelev, Oct 26 2017

Examples

			Triangle begins
         0,      1;
         0,      1;
         2,      0,        2;
         8,      0,        4;
         0,     24,        0,     12;
         0,    108,        0,     36;
       576,      0,      720,      0,      144;
      4608,      0,     4032,      0,      576;
         0,  31680,        0,  31680,        0,  2880;
         0, 288000,        0, 201600,        0, 14400;
   2505600,      0,  2764800,      0,  1987200,     0,  86400;
  30067200,      0, 28512000,      0, 14515200,     0, 518400;
The compressed triangle resulting from the division of each entry by the last entry of its row begins as follows. If i is the index of the row, starting with i = 1 then this last entry is floor(i/2)! * (i - floor(i/2))!.
    0,   1;
    0,   1;
    1,   0,   1;
    2,   0,   1;
    0,   2,   0,   1;
    0,   3,   0,   1;
    4,   0,   5,   0,   1;
    8,   0,   7,   0,   1;
    0,  11,   0,  11,   0,   1;
    0,  20,   0,  14,   0,   1;
   29,   0,  32,   0,  23,   0,   1;
   58,   0,  55,   0,  28,   0,   1;
    0,  88,   0,  94,   0,  46,   0,   1;
    0, 169,   0, 146,   0,  53,   0,   1;
  263,   0, 282,   0, 283,   0,  86,   0,   1;
  526,   0, 515,   0, 383,   0,  97,   0,   1;
For the sense of the entries of this triangle see the [Shevelev] link (with a continuation there). Let B(n,i) be the set of permutations C of 1..n for which c_1 - c_2 + ... + (-1)^(n-1)*c_n = i^2, i >= 0. Then |B(n,i)| is the entry in the n-th row and i-th column of the first triangle. Let us call two permutations C_1 and C_2 equivalent if one of them is obtained from another by a permutation of its elements with odd indices and/or separately with even indices. Let b(n,i) be the entry in the n-th row and i-th column of the second triangle. Then b(n,i) is the maximal possible number of pairwise non-equivalent permutations which could be chosen in B(n,i). On the other hand, it is the smallest number of non-equivalent permutations in B(n,i) such that every other permutation in B(n,i) is equivalent to one of them. So in some sense b(n,i) is the dimension of B(n,i). In particular, b(n,i) = 0 corresponds to empty B(n,i). - _Vladimir Shevelev_, Nov 13 2017
		

Crossrefs

Programs

  • Mathematica
    a293783=Flatten[Table[PadLeft[Riffle[#,Table[0,{Floor[(n-1)/4]}]/.{}->0],1+Floor[(1+n)/2]](Floor[n/2]!*(n-Floor[n/2])!)&[Reverse[Map[SeriesCoefficient[QBinomial[n,Floor[(n+1)/2],q],{q,0,#}]&,Map[2#(Floor[(n+1)/2] - #)&,Range[0,Floor[(n+1)/4]]]]]],{n,20}]] (* Peter J. C. Moses, Nov 01 2017 *)

Formula

Row sums of triangle give A293857.
If C = {c_1..c_n} is a permutation of {1..n}, then c_1 - c_2 + ... has the same parity as 1 + 2 + ... + n = n*(n+1)/2. So adjacent rows in the triangle for odd and even n have the same positions of 0's. These positions follow through one, beginning from the first position for n == 1,2 (mod 4) and from the second position for n == 3,0 (mod 4). - David A. Corneth and Vladimir Shevelev, Oct 19 2017

A293857 a(n) is the number of permutations {c_1..c_n} of {1..n} for which c_1 - c_2 + ... + (-1)^(n-1)*c_n are squares.

Original entry on oeis.org

1, 1, 1, 4, 12, 36, 144, 1440, 9216, 66240, 504000, 7344000, 73612800, 830995200, 9373190400, 181875456000, 2474319052800, 38246274662400, 572552876851200, 13783143886848000, 237527801118720000, 4658378696294400000, 86818505051013120000, 2488457229932298240000
Offset: 0

Author

Vladimir Shevelev, Oct 17 2017

Keywords

Comments

For a permutation C = {c_1..c_n} of {1..n}, set s(C) = c_1 - c_2 + ... + (-1)^(n-1)*c_n. Then max s(C) is square that is (ceil(n/2))^2 or A008794(n+1).
a(n)/n! is slowly and non-monotonically decreasing: 1, 1/2, 2/3, 1/2, 3/10, 1/5, 2/7, 8/35, 23/126, 5/36, 85/462, 71/462, ... .
Positions for which a(n) divisible by all primes <= n: 1, 4, 10, ... .
The smallest primes <= n not dividing a(n) or 0 if there is no such primes: 0, 2, 3, 0, 5, 5, 7, 5, 7, 0, 7, 7, ... .
Let k = floor(n / 2). Then a(n) = divisible by k! * (n-k)!. - David A. Corneth, Oct 18 2017. (For a proof, cf. comment in A293984. - Vladimir Shevelev, Nov 06 2017)

Examples

			Let n=3. For a permutation C={c_1,c_2,c_3}, set s = s(C) = c_1 - c_2 + c_3. We have the permutations:
1,2,3; s=2
1,3,2; s=0
2,1,3; s=4
2,3,1; s=0
3,1,2; s=4
3,2,1; s=2
Here there are 4 permutations for which {s} are squares. So a(3)=4.
		

Crossrefs

Programs

  • Maple
    b:= proc(p, m, s) option remember; (n-> `if`(n=0, `if`(issqr(s), 1, 0),
          `if`(p>0, b(p-1, m, s+n), 0)+`if`(m>0, b(p, m-1, s-n), 0)))(p+m)
        end:
    a:= n-> (t-> b(n-t, t, 0)*t!*(n-t)!)(iquo(n, 2)):
    seq(a(n), n=0..28);  # Alois P. Heinz, Sep 17 2020
  • Mathematica
    a293857=Table[Total[(Floor[n/2]!*(n-Floor[n/2])!)(Reverse[Map[SeriesCoefficient[QBinomial[n,Floor[(n+1)/2],q],{q,0,#}]&,Map[2#(Floor[(n+1)/2] - #)&,Range[0,Floor[(n+1)/4]]]]]
    )],{n,25}] (* Peter J. C. Moses, Nov 01 2017 *)

Formula

From author's comment in A008794 it follows that a(n) >= A010551(n).

Extensions

a(5)-a(12) from Peter J. C. Moses, Oct 17 2017
a(13)-a(23) from David A. Corneth, Oct 17 2017
a(0)=1 prepended by Alois P. Heinz, Sep 17 2020

A293984 a(n) = A293857(n)/A010551(n).

Original entry on oeis.org

1, 1, 1, 2, 3, 3, 4, 10, 16, 23, 35, 85, 142, 229, 369, 895, 1522, 2614, 4348, 10467, 18038, 32160, 54488, 130148, 226594, 414130, 710880, 1685496, 2958666, 5503780, 9544629, 22476690, 39724867, 74884360, 130949625, 306457174, 544777361, 1037587152, 1827129712
Offset: 0

Author

Vladimir Shevelev, Oct 21 2017

Keywords

Comments

Or row sums of the compressed triangle in A293783.
Conjecture: all terms are positive integers.
From David A. Corneth (with participation of Vladimir Shevelev), Oct 24 2017: (Start)
Conjecture is true. Proof.
1) Let C={c_1..c_n} be a permutation of {1..n}, d(C) be alternating sum c_1 - c_2 + ... +(-1)^(n-1)*c_n. Then max_{C in S_n}d(C) = A008794(n+1). Indeed, if n = 2*m, then evidently the maximum is reached on a C={2*m,1,2*m-1,2,...,m+1,m}; if n=2*m - 1, then the maximum is reached on a C={2*m-1,1,2*m-2,2,...,m-1,m}. In both cases max_{C in S_n}d(C) = m^2 = A008794(n+1). The number of distinct reaches of the maximum is, evidently, floor(n/2)!*floor((n+1)/2)! which is also Avi Peretz's representation (2001) of A010551(n). So, A293857(n) >= A010551(n) and a(n)>=1.
2) Consider two cases: a) there are no C in S_n for which d(C) = k^2 < A008794(n+1). Then A293857(n) = A010551(n) and a(n) = 1; b) there is C for which d(C) = k^2 < A008794(n+1). Then, as in 1) to reach k^2 in case n=2*m consider all (n/2)! permutations of {c_1,c_3,...,c_n} and all (n/2)! permutations of {c_2, c_4, ... , c_(n+1)}, or in case n = 2*m-1, all ((n+1)/2)! permutations of {c_1,c_3,...,c_(2*m-1)} and ((n-1)/2)! permutations of {c_2,c_4,...,c_(2*m-2)}. So we again have A010551(n) distinct reaches. If the same k^2 could be reached by another permutation C_1 (other than above permutations of C), then we again obtain A010551 distinct reaches, etc. So, A293857(n) is always divisible by A010551(n). (End)

Crossrefs

Programs

  • Maple
    b:= proc(p, m, s) option remember; (n-> `if`(n=0, `if`(issqr(s), 1, 0),
          `if`(p>0, b(p-1, m, s+n), 0)+`if`(m>0, b(p, m-1, s-n), 0)))(p+m)
        end:
    a:= n-> (t-> b(n-t, t, 0))(iquo(n, 2)):
    seq(a(n), n=0..40);  # Alois P. Heinz, Sep 17 2020
  • Mathematica
    a293984=Table[
    possibleSums=Range[1/2-(-1)^n/2-Floor[n/2]^2,Floor[(n+1)/2]^2];
    filteredSums=Select[possibleSums,IntegerQ[Sqrt[#]]&];
    positions=Map[Flatten[{#,Position[possibleSums,#,1]-1}]&,filteredSums];
    Total[Map[SeriesCoefficient[QBinomial[n,Floor[(n+1)/2],q],{q,0,#[[2]]/2}]&,positions]],{n,20}] (* Peter J. C. Moses, Nov 05 2017 *)

Extensions

a(13)-a(30) from David A. Corneth, Oct 21 2017; a(31)-a(38) from Peter J. C. Moses, Nov 02 2017
a(0)=1 prepended by Alois P. Heinz, Sep 17 2020

A293459 Denominator of probability that a permutation of elements of some subset of set {1,2..n} is a permutation of elements of some set of the form 1..k, k <= n.

Original entry on oeis.org

1, 1, 7, 385, 3628921, 1216452311762688721, 10333147966386144929717742279694909445041, 5989285834984945898036392571843137173092920925318860392502631168811983977451725959000900501504040321
Offset: 1

Author

Vladimir Shevelev, Oct 09 2017

Keywords

Crossrefs

Cf. A293458(numerators).

Programs

  • Mathematica
    a[n_] := Denominator[Sum[k!, {k, 0, n}]/Sum[Binomial[n, k]!, {k, 0, n}]]; Array[a, 8] (* Amiram Eldar, Sep 21 2019 *)
  • PARI
    a(n) = denominator(sum(k=0, n, k!)/sum(k=0, n, binomial(n,k)!)); \\ Michel Marcus, Oct 12 2017

Extensions

More terms from Peter J. C. Moses, Oct 09 2017

A293458 Numerator of probability that a permutation of elements of some subset of set {1,2,...,n} is a permutation of elements of some set of the form 1..k, k <= n.

Original entry on oeis.org

1, 1, 5, 17, 77, 437, 2957, 23117, 204557, 2018957, 21977357, 261478157, 3374988557, 46964134157, 700801318157, 11162196262157, 189005910310157, 3390192763174157, 64212742967590157, 1280663747055910157, 26826134832910630157, 588826498721714470157
Offset: 1

Author

Vladimir Shevelev, Oct 09 2017

Keywords

Comments

The number of all permutations of elements of sets {1..k}, k <= n, is b(n) = Sum_{k=0..n} k! while the number of all permutations of elements of all subsets of set {1,2..n} is c(n) = Sum_{k=0..n} binomial(n,k)!. So the required probability (in a sample space) is b(n)/c(n), n >= 1 (after reduction of the fractions).
Apparently a(n) = A014288(n) for n > 2. - Georg Fischer, Oct 23 2018

Crossrefs

Denominators are in A293459.
Cf. A014288.

Programs

  • Mathematica
    a[n_] := Numerator[Sum[k!, {k, 0, n}]/Sum[Binomial[n, k]!, {k, 0, n}]]; Array[a, 25] (* Amiram Eldar, Sep 21 2019 *)
  • PARI
    a(n) = numerator(sum(k=0, n, k!)/sum(k=0, n, binomial(n,k)!)); \\ Michel Marcus, Oct 12 2017

Extensions

More terms from Peter J. C. Moses, Oct 09 2017