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

A176732 a(n) = (n+5)*a(n-1) + (n-1)*a(n-2), a(-1)=0, a(0)=1.

Original entry on oeis.org

1, 6, 43, 356, 3333, 34754, 398959, 4996032, 67741129, 988344062, 15434831091, 256840738076, 4536075689293, 84731451264186, 1668866557980343, 34563571477305464, 750867999393119889, 17072113130285524982, 405423357986250112699, 10037458628015142154452, 258639509502117306002581
Offset: 0

Views

Author

Wolfdieter Lang, Jul 14 2010

Keywords

Comments

a(n) enumerates the possibilities for distributing n beads, n>=1, labeled differently from 1 to n, over a set of (unordered) necklaces, excluding necklaces with exactly one bead, and k=6 indistinguishable, ordered, fixed cords, each allowed to have any number of beads. Beadless necklaces as well as beadless cords contribute a factor 1 in the counting, e.g., a(0):= 1*1 =1. See A000255 for the description of a fixed cord with beads. This produces for a(n) the exponential (aka binomial) convolution of the subfactorial sequence {A000166(n)} and the sequence {A001725(n+5) = (n+5)!/5!}. See the necklaces and cords problem comment in A000153. Therefore the recurrence with inputs holds. This comment derives from a family of recurrences found by Malin Sjodahl for a combinatorial problem for certain quark and gluon diagrams (Feb 27 2010).

Examples

			Necklaces and 6 cords problem. For n=4 one considers the following weak 2-part compositions of 4: (4,0), (3,1), (2,2), and (0,4), where (1,3) does not appear because there are no necklaces with 1 bead. These compositions contribute respectively !4*1,binomial(4,3)*!3*c6(1), (binomial(4,2)*2)*c6(2), and 1*c6(4) with the subfactorials !n:=A000166(n) (see the necklace comment there) and the c6(n):=A001725(n+5) numbers for the pure 6-cord problem (see the remark on the e.g.f. for the k-cord problem in A000153; here for k=6: 1/(1-x)^6). This adds up as 9 + 4*2*6 + (6*1)*42 + 3024 = 3333 = a(4).
		

Crossrefs

Cf. A000153, A000261, A001909, A001910 (necklaces and k=5 cords), A176732.

Programs

  • Maple
    a := n -> hypergeom([-n,7],[],1)*(-1)^n:
    seq(simplify(a(n)),n=0..9); # Peter Luschny, Apr 25 2015
  • Mathematica
    Rest[RecurrenceTable[{a[0]==1,a[-1]==0,a[n]==(n+5)a[n-1]+(n-1)a[n-2]},a,{n,20}]] (* Harvey P. Dale, Oct 01 2012 *)

Formula

E.g.f. (exp(-x)/(1-x))*(1/(1-x)^6) = exp(-x)/(1-x)^7, equivalent to the recurrence.
a(n) = A086764(n+6,6).
a(n) = A090010(n), n>0. - R. J. Mathar, Jul 22 2010
a(n) = (-1)^n*hypergeom([-n,7],[],1). - Peter Luschny, Apr 25 2015

A076731 Table T(n,k) giving number of ways of obtaining exactly 0 correct answers on an (n,k)-matching problem (1 <= k <= n).

Original entry on oeis.org

0, 1, 1, 2, 3, 2, 3, 7, 11, 9, 4, 13, 32, 53, 44, 5, 21, 71, 181, 309, 265, 6, 31, 134, 465, 1214, 2119, 1854, 7, 43, 227, 1001, 3539, 9403, 16687, 14833, 8, 57, 356, 1909, 8544, 30637, 82508, 148329, 133496, 9, 73, 527, 3333, 18089, 81901, 296967, 808393
Offset: 1

Views

Author

Mohammad K. Azarian, Oct 28 2002

Keywords

Comments

Hanson et al. define the (n,k)-matching problem in the following realistic way. A matching question on an exam has k questions with n possible answers to choose from, each question having a unique answer. If a student guesses the answers at random, using each answer at most once, what is the probability of obtaining r of the k correct answers?
The T(n,k) represent the number of ways of obtaining exactly zero correct answers, i.e., r=0, given k questions and n possible answers, 1 <= k <= n.
T(n,k) is the number of injections from [1,...,k] into [1,...,n] with no fixed points. - David Bevan, Apr 29 2013

Examples

			0; 1,1; 2,3,2; 3,7,11,9; ...
Formatted as a square array:
0 1 2 3 4 5 6 7 8
1 3 7 13 21 31 43 57 which equals A002061
2 11 32 71 134 227 356 which equals A094792
9 53 181 465 1001 1909 which equals A094793
44 309 1214 3539 8544 which equals A094794
265 2119 9403 30637 which equals A023043
1854 16687 82508 which equals A023044
14833 148329 which equals A023045
Columns give A000255 A000153 A000261 A001909 A001910
Formatted as a triangular array (mirror image of A086764):
0
1 1
2 3 2
3 7 11 9
4 13 32 53 44
5 21 71 181 309 265
6 31 134 465 1214 2119 1854
7 43 227 1001 3539 9403 16687 14833
8 57 356 1909 8544 30637 82508 148329 133496
		

Crossrefs

Similar to A060475.

Programs

  • Maple
    A076731 := proc(n,k): (1/(n-k)!)*A061312(n-1,k-1) end: A061312:=proc(n,k): add(((-1)^j)*binomial(k+1,j)*(n+1-j)!, j=0..k+1) end: for n from 1 to 7 do seq(A076731(n,k), k=1..n) od; seq(seq(A076731(n,k), k=1..n), n=1..9); # Johannes W. Meijer, Jul 27 2011
  • Mathematica
    t[n_,k_] := k!(n - k)! SeriesCoefficient[Exp[z(1-u+u^2z)/(1-z u)]/(1-z u), {z,0,n}, {u,0,k}]; Table[t[n,k], {n,9}, {k,n}] //TableForm (* David Bevan, Apr 29 2013 *)
    t[n_, k_] := Pochhammer[n-k+1, k]*Hypergeometric1F1[-k, -n, -1]; Table[t[n, k], {n, 1, 10}, {k, 1, n}] // Flatten (* Jean-François Alcover, Nov 29 2013 *)

Formula

T(n,k) = F(n,k)*Sum{((-1)^j)*C(k, j)*(n-j)! (j=0 to k)}, where F(n,k) = 1/(n-k)! for 1 <= k <= n.
From Johannes W. Meijer, Jul 27 2011: (Start)
T(n,k) = (n-1)*T(n-1,k-1) + (k-1)*T(n-2,k-2) with T(n,1) = (n-1) and T(n,n) = A000166(n) [Hanson et al.]
T(n,k) = (1/(n-k)!)*A061312(n-1,k-1)
sum(T(n,k), k=1..n) = A193464(n); row sums. (End)
T(n,k) = k!(n-k)![z^n*u^k]J(z,u) where J(z,u) = exp(z(1-u+z*u^2)/(1-z*u))/(1-z*u) is the exponential generating function of labeled digraphs consisting just of directed paths and oriented cycles (of length at least 2), z marking the vertices and u the edges; [z^n*u^k]J(z,u) is the coefficient of z^n*u^k in J(z,u). - David Bevan, Apr 29 2013

Extensions

Additional comments from Zerinvary Lajos, Mar 30 2006

A060475 Triangular array formed from successive differences of factorial numbers, then with factorials removed.

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 1, 2, 3, 2, 1, 3, 7, 11, 9, 1, 4, 13, 32, 53, 44, 1, 5, 21, 71, 181, 309, 265, 1, 6, 31, 134, 465, 1214, 2119, 1854, 1, 7, 43, 227, 1001, 3539, 9403, 16687, 14833, 1, 8, 57, 356, 1909, 8544, 30637, 82508, 148329, 133496, 1, 9, 73, 527, 3333, 18089, 81901, 296967, 808393, 1468457, 1334961
Offset: 0

Views

Author

Henry Bottomley, Mar 16 2001

Keywords

Comments

T(n,k) is also the number of partial bijections (of an n-element set) with a fixed domain of size k and without fixed points. Equivalently, T(n,k) is the number of partial derangements with a fixed domain of size k in the symmetric inverse semigroup (monoid), I sub n. - Abdullahi Umar, Sep 14 2008

Examples

			Triangle begins
  1,
  1,  0,
  1,  1,  1,
  1,  2,  3,  2,
  1,  3,  7, 11,  9,
  1,  4, 13, 32, 53, 44,
  ...
		

Crossrefs

Columns include A000012, A001477, A002061.
Diagonals include A000166, A000255, A000153, A000261, A001909, A001910.
Main diagonal is abs of A002119.
Similar to A076731.
Row sums equal A003470. - Johannes W. Meijer, Jul 27 2011

Programs

  • Magma
    [[Factorial(k)*(&+[(-1)^j*Binomial(n-j, k-j)/Factorial(j): j in [0..k]]): k in [0..n]]: n in [0..10]]; // G. C. Greubel, Mar 04 2019
    
  • Maple
    A060475 := proc(n,k): k! * add(binomial(n-j,k-j)*(-1)^j/j!, j=0..k) end:
    seq(seq(A060475(n,k), k=0..n), n=0..7); # Johannes W. Meijer, Jul 27 2011
    T := (n,k) -> KummerU(-k, -n, -1):
    seq(seq(simplify(T(n, k)), k = 0..n), n = 0..10); # Peter Luschny, Jul 07 2022
  • Mathematica
    t[n_, k_] := k!*Sum[Binomial[n - j, k - j]*(-1)^j/j!, {j, 0, k}]; Table[t[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Robert G. Wilson v, Aug 08 2011 *)
  • PARI
    {T(n,k) = k!*sum(j=0,k, (-1)^j*binomial(n-j, k-j)/j!)};
    for(n=0,10, for(k=0,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Mar 04 2019
    
  • Sage
    [[factorial(k)*sum((-1)^j*binomial(n-j, k-j)/factorial(j) for j in (0..k)) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Mar 04 2019

Formula

T(n,k) = A047920(n,k)/(n-k)! = (n-1)*T(n-1,k-1) + (k-1)*T(n-2,k-2) = (n-k+1)*T(n, k-1) - T(n-1,k-1).
From Abdullahi Umar, Sep 14 2008: (Start)
T(n,k) = k! * Sum_{j=0..k} C(n-j,k-j)*(-1)^j/j!.
C(n,k)*T(n,k) = A144089(n, k). (End)
T(n,k) = A076732(n+1,k+1)/(k+1). - Johannes W. Meijer, Jul 27 2011
E.g.f. as a square array: A(x,y) = exp(-x)/(1 - x - y) = (1 + y + y^2 + y^3 + ...) + (y + 2*y^2 + 3*y^3 + 4*y^4 + ...)*x + (1 + 3*y + 7*y^2 + 13*y^3 + ...)*x^2/2! + (2 + 11*y + 32*y^2 + 71*y^3 + ...)*x^3/3! + .... Observe that (1 - y)*A(x*(1 - y),y) = exp(x*(y - 1))/(1 - x) is the e.g.f. for A008290. - Peter Bala, Sep 25 2013
T(n, k) = KummerU(-k, -n, -1). - Peter Luschny, Jul 07 2022

A346204 a(n) is the number of permutations on [n] with at least one strong fixed point and at least one small descent.

Original entry on oeis.org

0, 0, 2, 5, 24, 128, 795, 5686, 46090, 418519, 4213098, 46595650, 561773033, 7333741536, 103065052300, 1551392868821, 24902155206164, 424588270621876, 7663358926666175, 145967769353476594, 2926073829112697318, 61577929208485406331, 1357369100658321844470, 31276096500003460511422
Offset: 1

Views

Author

Keywords

Comments

A small descent in a permutation p is a position i such that p(i)-p(i+1)=1.
A strong fixed point is a fixed point (or splitter) p(k)=k such that p(i) < k for i < k and p(j) > k for j > k.

Examples

			For n=4, the a(4)=5 permutations on [4] with strong fixed points and small descents: {(1*, 2*, [4, 3]), (1*, [3, 2], 4*), (1*, <4, 3, 2>), ([2, 1], 3*, 4*), (<3, 2, 1>, 4*)}. *strong fixed point, []small descent, <>consecutive small descents.
		

References

  • E. R. Berlekamp, J. H. Conway, and R. K. Guy, Winning Ways For Your Mathematical Plays, Vol. 1, CRC Press, 2001.

Crossrefs

Programs

  • Python
    import math
    bn = [1,1,1]
    wn = [0,0,0]
    kn = [1,1,1]
    def summation(n):
        final = bn[n] - bn[n-1]
        for k in range(4,n+1):
            final -= wn[k-1]*bn[n-k]
        return final
    def smallsum(n):
        final = bn[n-1]
        for k in range(4,n+1):
            final += wn[k-1]*bn[n-k]
        return final
    def derrangement(n):
        finalsum = 0
        for i in range(n+1):
            if i%2 == 0:
                finalsum += math.factorial(n)*1//math.factorial(i)
            else:
                finalsum -= math.factorial(n)*1//math.factorial(i)
        if finalsum != 0:
            return finalsum
        else:
            return 1
    def fixedpoint(n):
        finalsum = math.factorial(n-1)
        for i in range(2,n):
            finalsum += math.factorial(i-i)*math.factorial(n-i-1)
            print(math.factorial(i-i)*math.factorial(n-i-1))
        return finalsum
    def no_cycles(n):
        goal = n
        cycles = [0, 1]
        current = 2
        while current<= goal:
            new = 0
            k = 1
            while k<=current:
                new += (math.factorial(k-1)-cycles[k-1])*(math.factorial(current-k))
                k+=1
            cycles.append(new)
            current+=1
        return cycles
    def total_func(n):
        for i in range(3,n+1):
            bn.append(derrangement(i+1)//(i))
            kn.append(smallsum(i))
            wn.append(summation(i))
        an = no_cycles(n)
        tl = [int(an[i]-kn[i]) for i in range(n+1)]
        factorial = [math.factorial(x) for x in range(0,n+1)]
        print("A346189 :" + str(wn[1:]))
        print("A346198 :" + str([factorial[i]-wn[i]-tl[i]-kn[i] for i in range(n+1)][1:]))
        print("A346199 :" + str(kn[1:]))
        print("A346204 :" + str(tl[1:]))
    total_func(20)

Formula

a(n) = A006932(n) - A346199(n).

A090013 Permanent of (0,1)-matrix of size n X (n+d) with d=3 and n-1 zeros not on a line.

Original entry on oeis.org

4, 16, 84, 536, 4004, 34176, 327604, 3481096, 40585284, 514872176, 7058605844, 103969203576, 1637182717924, 27442553929696, 487806792137844, 9164718013496936, 181446744138509444, 3775570370986139856
Offset: 1

Views

Author

Jaap Spies, Dec 13 2003

Keywords

References

  • Brualdi, Richard A. and Ryser, Herbert J., Combinatorial Matrix Theory, Cambridge NY (1991), Chapter 7.

Crossrefs

Programs

  • Mathematica
    t={4,16};Do[AppendTo[t,(n+2)*t[[-1]]+(n-2)*t[[-2]]],{n,3,18}];t (* Indranil Ghosh, Feb 21 2017 *)

Formula

a(n) = (n+2)*a(n-1) + (n-2)*a(n-2), a(1)=4, a(2)=16
a(n) ~ exp(-1) * n! * n^3 / 6. - Vaclav Kotesovec, Nov 30 2017

Extensions

Corrected by Jaap Spies, Jan 26 2004

A090015 Permanent of (0,1)-matrix of size n X (n+d) with d=5 and n-1 zeros not on a line.

Original entry on oeis.org

6, 36, 258, 2136, 19998, 208524, 2393754, 29976192, 406446774, 5930064372, 92608986546, 1541044428456, 27216454135758, 508388707585116, 10013199347882058, 207381428863832784, 4505207996358719334
Offset: 1

Views

Author

Jaap Spies, Dec 13 2003

Keywords

References

  • Brualdi, Richard A. and Ryser, Herbert J., Combinatorial Matrix Theory, Cambridge NY (1991), Chapter 7.

Crossrefs

Programs

  • Maple
    f:= gfun:-rectoproc({a(n) = (n+4)*a(n-1) + (n-2)*a(n-2),a(1)=6,a(2)=36},a(n),remember):
    map(f, [$1..40]); # Robert Israel, Nov 26 2018
  • Mathematica
    t={6,36};Do[AppendTo[t,(n+4)*t[[-1]]+(n-2)*t[[-2]]],{n,3,17}];t (* Indranil Ghosh, Feb 21 2017 *)
    RecurrenceTable[{a[n] == (n+4)*a[n-1] + (n-2)*a[n-2],
    a[1] == 6, a[2] == 36}, a, {n, 1, 40}] (* Jean-François Alcover, Sep 16 2022, after Robert Israel *)

Formula

a(n) = (n+4)*a(n-1) + (n-2)*a(n-2), a(1)=6, a(2)=36
a(n) ~ exp(-1) * n! * n^5 / 5!. - Vaclav Kotesovec, Nov 30 2017
a(n) = ((n^6+21*n^5+160*n^4+545*n^3+814*n^2+415*n+1)*exp(-1)*Gamma(n, -1)+(-1)^n*(n^5+20*n^4+141*n^3+422*n^2+499*n+154))/120. - Robert Israel, Nov 26 2018

Extensions

Corrected by Jaap Spies, Jan 26 2004

A280425 Sixth column of Euler's difference table in A068106.

Original entry on oeis.org

0, 0, 0, 0, 120, 600, 3720, 27240, 229080, 2170680, 22852200, 264398280, 3332744760, 45440868120, 666166856520, 10446911529000, 174478419885720, 3091496076405240, 57915148833808680, 1143668772912038280, 23742102690747895800, 516882856872298424280, 11775038596933279562760
Offset: 1

Views

Author

Enrique Navarrete, Jan 02 2017

Keywords

Comments

For n >= 6, this is the number of permutations of [n] that avoid substrings j(j+5), 1 <= j <= n-5.

Examples

			a(9) = 229080 since there are 229080 permutations in S9 that avoid substrings {16,27,38,49}.
		

Crossrefs

Also 120 times A001910.
Cf. A068106.

Programs

  • Mathematica
    a[1]=a[2]=a[3]=a[4]=0; a[5]=120;a[6]=600;a[n_]:=Sum[(-1)^j*Binomial[n-5,j]*(n-j)!,{j,0,n-5}];Table[a[n],{n,1,23}] (* Indranil Ghosh, Feb 25 2017 *)

Formula

For n>=6: a(n) = Sum_{j=0..n-5} (-1)^j*binomial(n-5,j)*(n-j)!.
Note a(n)/n! ~ 1/e.

A346189 a(n) is the number of permutations on [n] with no strong fixed points or small descents.

Original entry on oeis.org

0, 0, 2, 6, 34, 214, 1550, 12730, 116874, 1187022, 13219550, 160233258, 2100360778, 29610224590, 446789311934, 7185155686666, 122690711149290, 2217055354281582, 42269657477711198, 847998698508705834, 17857221256001240458, 393839277313540073230, 9078806210245773668990, 218340709713567352161226
Offset: 1

Views

Author

Keywords

Comments

A small descent in a permutation p is a position i such that p(i)-p(i+1)=1.
A strong fixed point is a fixed point (or splitter) p(k)=k such that p(i) < k for i < k and p(j) > k for j > k.

Examples

			For n = 4, the a(4) = 6 permutations on [4] with no strong fixed points or small descents: {(2,3,4,1),(3,4,1,2),(4,1,2,3),(3,1,4,2),(2,4,1,3),(4,2,3,1)}.
		

References

  • E. R. Berlekamp, J. H. Conway, and R. K. Guy, Winning Ways For Your Mathematical Plays, Vol. 1, CRC Press, 2001.

Crossrefs

Programs

Formula

For n > 3, a(n) = b(n) - b(n-1) - Sum{i=4..n}(a(i-1)*b(n-i)) where b(n) = A000255(n-1) and b(0) = 1.

A346198 a(n) is the number of permutations on [n] with no strong fixed points but contains at least one small descent.

Original entry on oeis.org

0, 1, 1, 8, 43, 283, 2126, 17947, 168461, 1741824, 19684171, 241506539, 3198239994, 45482655683, 691471698917, 11193266251700, 192238116358427, 3491633681792507, 66875708261486766, 1347168876070616179, 28474546456352896021, 630130731702950549248, 14570725407559756078387, 351411668456841530417027
Offset: 1

Views

Author

Keywords

Comments

A small descent in a permutation p is a position i such that p(i)-p(i+1)=1.
A strong fixed point is a fixed point (or splitter) p(k)=k such that p(i) < k for i < k and p(j) > k for j > k.

Examples

			For n = 4, the a(4) = 8 permutations on [4] with no strong fixed points but has small descents: {([2, 1], [4, 3]), (2, [4, 3], 1), ([3, 2], 4, 1), (3, 4, [2, 1]), (4, 1, [3, 2]), (4, [2, 1], 3), ([4, 3], 1, 2), (<4, 3, 2, 1>)} []small descent, <>consecutive small descents.
		

References

  • E. R. Berlekamp, J. H. Conway, and R. K. Guy, Winning Ways For Your Mathematical Plays, Vol. 1, CRC Press, 2001.

Crossrefs

Programs

Formula

For n > 2, a(n) = b(n)-c(n) where b(n) = A052186(n-1), c(n) = A346189(n).

A346199 a(n) is the number of permutations on [n] with at least one strong fixed point and no small descents.

Original entry on oeis.org

1, 1, 1, 5, 19, 95, 569, 3957, 31455, 281435, 2799981, 30666153, 366646995, 4751669391, 66348304849, 992975080813, 15856445382119, 269096399032035, 4836375742967861, 91766664243841393, 1833100630242606203, 38452789552631651191, 845116020421125048153
Offset: 1

Views

Author

Keywords

Comments

A small descent in a permutation p is a position i such that p(i)-p(i+1)=1.
A strong fixed point is a fixed point (or splitter) p(k)=k such that p(i) < k for i < k and p(j) > k for j > k.

Examples

			For n = 4, the a(4) = 5 permutations on [4] with strong fixed points but no small descents: {(1*, 2*, 3*, 4*), (1*, 3, 4, 2), (1*, 4, 2, 3), (2, 3, 1, 4*), (3, 1, 2, 4*)} where * marks strong fixed points.
		

References

  • E. R. Berlekamp, J. H. Conway, and R. K. Guy, Winning Ways For Your Mathematical Plays, Vol. 1, CRC Press, 2001.

Crossrefs

Programs

Formula

a(n) = b(n-1) + Sum_{i=4..n} A346189(i-1)*b(n-i) where b(n) = A000255(n).
Previous Showing 11-20 of 23 results. Next