A189281
Number of permutations p of 1,2,...,n satisfying p(i+2) - p(i) <> 2 for all 1 <= i <= n-2.
Original entry on oeis.org
1, 1, 2, 5, 18, 75, 410, 2729, 20906, 181499, 1763490, 18943701, 222822578, 2847624899, 39282739034, 581701775369, 9202313110506, 154873904848803, 2762800622799362, 52071171437696453, 1033855049655584786, 21567640717569135515
Offset: 0
- Rintaro Matsuo, Table of n, a(n) for n = 0..300 (terms 0..35 from Vaclav Kotesovec, terms 36..39 from Christoph Koutschan, computed using a parallelization of Kotesovec's Mathematica program)
- Robert Dougherty-Bliss, Experimental Methods in Number Theory and Combinatorics, Ph. D. Dissertation, Rutgers Univ. (2024). See p. 4.
- Manuel Kauers, Comments on the Conjectured Recurrence for A189281.
- Manuel Kauers and Christoph Koutschan, Guessing with Little Data, arXiv:2202.07966 [cs.SC], 2022.
- Vaclav Kotesovec, Non-attacking chess pieces, 6ed, 2013, p. 644.
- Vaclav Kotesovec, Mathematica program for this sequence.
- Rintaro Matsuo, O(n^4) code to calculate a(n)
- George Spahn and Doron Zeilberger, Counting Permutations Where The Difference Between Entries Located r Places Apart Can never be s (For any given positive integers r and s), arXiv:2211.02550 [math.CO], 2022.
A018934
From the game of Mousetrap.
Original entry on oeis.org
0, 0, 0, 2, 8, 42, 256, 1810, 14568, 131642, 1320128, 14551074, 174879880, 2276108362, 31894886208, 478775722802, 7664993150696, 130369025763930, 2347604596782208, 44619881467365442, 892659329531868168, 18750556523491299434, 412601744979927877760, 9491630163800726992722
Offset: 0
-
Join[{0,0},With[{nn=30},CoefficientList[Series[(2x Exp[-x])/(1-x)^3, {x,0,nn}],x] Range[0,nn]!]] (* Harvey P. Dale, Nov 16 2013 *)
-
C=binomial;
a(n)=if(n<=2, 0, n! + sum(k=1,n, (-1)^k * ( C(n-1,k)+C(n-2,k-1) )*(n-k)! ) );
/* Joerg Arndt, Apr 22 2013 */
-
def A():
a, b, n = 1, 1, 1
yield 0
while True:
yield b - a
n += 1
a, b = b, (n-2)*a+(n-1)*b
A018934 = A()
print([next(A018934) for in range(24)]) # _Peter Luschny, Jan 30 2017
A061312
Triangle T[n,m]: T[n,-1] = 0; T[0,0] = 0; T[n,0] = n*n!; T[n,m] = T[n,m-1] - T[n-1,m-1].
Original entry on oeis.org
0, 1, 1, 4, 3, 2, 18, 14, 11, 9, 96, 78, 64, 53, 44, 600, 504, 426, 362, 309, 265, 4320, 3720, 3216, 2790, 2428, 2119, 1854, 35280, 30960, 27240, 24024, 21234, 18806, 16687, 14833, 322560, 287280, 256320, 229080, 205056, 183822, 165016, 148329
Offset: 0
0,
1, 1,
4, 3, 2,
18, 14, 11, 9,
96, 78, 64, 53, 44,
600, 504, 426, 362, 309, 265,
4320, 3720, 3216, 2790, 2428, 2119, 1854,
35280, 30960, 27240, 24024, 21234, 18806, 16687, 14833,
Columns:
A001563,
A001564,
A001565,
A001688,
A001689,
A023044,
A023045,
A023046,
A023047;
A000166,
A000255,
A055790;
-
[[(&+[(-1)^j*Binomial(k+1,j)*Factorial(n-j+1): j in [0..k+1]]): k in [0..n]]: n in [0..20]]; // G. C. Greubel, Aug 13 2018
-
A061312 := proc(n,m): add(((-1)^j)*binomial(m+1,j)*(n+1-j)!, j=0..m+1) end: seq(seq(A061312(n,m), m=0..n), n=0..7); # Johannes W. Meijer, Jul 27 2011
-
T[n_, k_]:= Sum[(-1)^j*Binomial[k + 1, j]*(n + 1 - j)!, {j, 0, k + 1}]; Table[T[n, k], {n, 0, 100}, {k, 0, n}] // Flatten (* G. C. Greubel, Aug 13 2018 *)
-
for(n=0,20, for(k=0,n, print1(sum(j=0,k+1, (-1)^j*binomial(k+1,j) *(n-j+1)!), ", "))) \\ G. C. Greubel, Aug 13 2018
A129867
Row sums of triangular array T: T(j,k) = k*(j-k)! for k < j, T(j,k) = 1 for k = j; 1 <= k <= j.
Original entry on oeis.org
1, 2, 5, 14, 47, 200, 1073, 6986, 53219, 462332, 4500245, 48454958, 571411271, 7321388384, 101249656697, 1502852293010, 23827244817323, 401839065437636, 7182224591785949, 135607710526966262, 2696935204638786575
Offset: 1
First seven rows of T are
[ 1 ]
[ 1, 1 ]
[ 2, 2, 1 ]
[ 6, 4, 3, 1 ]
[ 24, 12, 6, 4, 1 ]
[ 120, 48, 18, 8, 5, 1 ]
[ 720, 240, 72, 24, 10, 6, 1 ]
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
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.
- E. R. Berlekamp, J. H. Conway, and R. K. Guy, Winning Ways For Your Mathematical Plays, Vol. 1, CRC Press, 2001.
-
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)
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
- Brualdi, Richard A. and Ryser, Herbert J., Combinatorial Matrix Theory, Cambridge NY (1991), Chapter 7.
-
t={4,16};Do[AppendTo[t,(n+2)*t[[-1]]+(n-2)*t[[-2]]],{n,3,18}];t (* Indranil Ghosh, Feb 21 2017 *)
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
- Brualdi, Richard A. and Ryser, Herbert J., Combinatorial Matrix Theory, Cambridge NY (1991), Chapter 7.
-
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
-
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 *)
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
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)}.
- E. R. Berlekamp, J. H. Conway, and R. K. Guy, Winning Ways For Your Mathematical Plays, Vol. 1, CRC Press, 2001.
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
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.
- E. R. Berlekamp, J. H. Conway, and R. K. Guy, Winning Ways For Your Mathematical Plays, Vol. 1, CRC Press, 2001.
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
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.
- E. R. Berlekamp, J. H. Conway, and R. K. Guy, Winning Ways For Your Mathematical Plays, Vol. 1, CRC Press, 2001.
Comments