A287838
Number of words of length n over the alphabet {0,1,...,10} such that no two consecutive terms have distance 8.
Original entry on oeis.org
1, 11, 115, 1205, 12625, 132275, 1385875, 14520125, 152130625, 1593906875, 16699721875, 174966753125, 1833166140625, 19206495171875, 201230782421875, 2108340300078125, 22089556912890625, 231437270629296875, 2424820490857421875, 25405391261720703125
Offset: 0
Cf.
A040000,
A003945,
A083318,
A078057,
A003946,
A126358,
A003946,
A055099,
A003947,
A015448,
A126473.
A287804-
A287819.
A287825-
A287839.
-
LinearRecurrence[{10, 5}, {1, 11, 115}, 20]
-
Vec((1 + x) / (1 - 10*x - 5*x^2) + O(x^40)) \\ Colin Barker, Nov 25 2017
-
def a(n):
if n in [0,1,2]:
return [1, 11, 115][n]
return 10*a(n-1) + 5*a(n-2)
A296449
Triangle I(m,n) read by rows: number of perfect lattice paths on the m*n board.
Original entry on oeis.org
1, 2, 4, 3, 7, 17, 4, 10, 26, 68, 5, 13, 35, 95, 259, 6, 16, 44, 122, 340, 950, 7, 19, 53, 149, 421, 1193, 3387, 8, 22, 62, 176, 502, 1436, 4116, 11814, 9, 25, 71, 203, 583, 1679, 4845, 14001, 40503, 10, 28, 80, 230, 664, 1922, 5574, 16188, 47064, 136946, 11, 31, 89, 257, 745, 2165, 6303, 18375, 53625, 156629, 457795
Offset: 1
Triangle begins:
1;
2, 4;
3, 7, 17;
4, 10, 26, 68;
5, 13, 35, 95, 259;
6, 16, 44, 122, 340, 950;
7, 19, 53, 149, 421, 1193, 3387;
8, 22, 62, 176, 502, 1436, 4116, 11814;
9, 25, 71, 203, 583, 1679, 4845, 14001, 40503;
10, 28, 80, 230, 664, 1922, 5574, 16188, 47064, 136946;
-
Inm := proc(n,m)
if m >= n then
(n+2)*3^(n-2)+(m-n)*add(A005773(i)*A005773(n-i),i=0..n-1)
+2*add((n-k-2)*3^(n-k-3)*A001006(k),k=0..n-3) ;
else
0 ;
end if;
end proc:
for m from 1 to 13 do
for n from 1 to m do
printf("%a,",Inm(n,m)) ;
end do:
printf("\n") ;
end do:
# Second program:
A296449row := proc(n) local gf, ser;
gf := n -> 1 + (x*(n - (3*n + 2)*x) + (2*x^2)*(1 +
ChebyshevU(n - 1, (1 - x)/(2*x))) / ChebyshevU(n, (1 - x)/(2*x)))/(1 - 3*x)^2;
ser := n -> series(expand(gf(n)), x, n + 1);
seq(coeff(ser(n), x, k), k = 1..n) end:
for n from 0 to 11 do A296449row(n) od; # Peter Luschny, Sep 07 2021
-
(* b = A005773 *) b[0] = 1; b[n_] := Sum[k/n*Sum[Binomial[n, j] * Binomial[j, 2*j - n - k], {j, 0, n}], {k, 1, n}];
(* c = A001006 *) c[0] = 1; c[n_] := c[n] = c[n-1] + Sum[c[k] * c[n-2-k], {k, 0, n-2}];
Inm[n_, m_] := If[m >= n, (n + 2)*3^(n - 2) + (m - n)*Sum[b[i]*b[n - i], {i, 0, n - 1}] + 2*Sum[(n - k - 2)*3^(n - k - 3)*c[k], {k, 0, n-3}], 0];
Table[Inm[n, m], {m, 1, 13}, {n, 1, m}] // Flatten (* Jean-François Alcover, Jan 23 2018, adapted from first Maple program. *)
A287805
Number of quinary sequences of length n such that no two consecutive terms have distance 2.
Original entry on oeis.org
1, 5, 19, 73, 281, 1083, 4175, 16097, 62065, 239307, 922711, 3557761, 13717913, 52893147, 203943935, 786361409, 3032030689, 11690820555, 45077144455, 173807214241, 670161078089, 2583988659867, 9963272432111, 38416111919777, 148123788152017, 571131629935179
Offset: 0
For n=2 the a(2)=19=25-6 sequences contain every combination except these six: 02,20,13,31,24,42.
Cf.
A040000,
A003945,
A083318,
A078057,
A003946,
A126358,
A003946,
A055099,
A003947,
A015448,
A126473.
A287804-
A287819.
-
LinearRecurrence[{4, 1, -6}, {1, 5, 19, 73}, 40]
-
def a(n):
if n in [0,1,2,3]:
return [1,5,19,73][n]
return 4*a(n-1)+a(n-2)-6*a(n-3)
A287806
Number of senary sequences of length n such that no two consecutive terms have distance 1.
Original entry on oeis.org
1, 6, 26, 114, 500, 2194, 9628, 42252, 185422, 813722, 3571010, 15671340, 68773514, 301811860, 1324498252, 5812546998, 25508302906, 111942925778, 491260382084, 2155891150146, 9461106209228, 41519967599596, 182209952129086, 799626506818554, 3509152727035810
Offset: 0
For n=2 the a(2)=26=36-10 sequences contain every combination except these ten: 01,10,12,21,23,32,34,43,45,54.
Cf.
A040000,
A003945,
A083318,
A078057,
A003946,
A126358,
A003946,
A055099,
A003947,
A015448,
A126473.
A287804-
A287819.
-
LinearRecurrence[{5, -2, -3}, {1, 6, 26, 114}, 40]
-
def a(n):
if n in [0, 1, 2, 3]:
return [1, 6, 26, 114][n]
return 5*a(n-1)-2*a(n-2)-3*a(n-3)
A287807
Number of senary sequences of length n such that no two consecutive terms have distance 2.
Original entry on oeis.org
1, 6, 28, 132, 624, 2952, 13968, 66096, 312768, 1480032, 7003584, 33141312, 156826368, 742110336, 3511703808, 16617560832, 78635142144, 372105487872, 1760822074368, 8332299518976, 39428864667648, 186579390892032, 882903157346304, 4177942598725632
Offset: 0
For n=2 the a(2)=28=36-8 sequences contain every combination except these eight: 02,20,13,31,24,42,35,53.
Cf.
A040000,
A003945,
A083318,
A078057,
A003946,
A126358,
A003946,
A055099,
A003947,
A015448,
A126473.
A287804-
A287819.
-
LinearRecurrence[{6, -6}, {1, 6, 28}, 40]
-
def a(n):
if n in [0, 1, 2]:
return [1, 6, 28][n]
return 6*a(n-1)-6*a(n-2)
A287808
Number of septenary sequences of length n such that no two consecutive terms have distance 1.
Original entry on oeis.org
1, 7, 37, 197, 1049, 5587, 29757, 158491, 844153, 4496123, 23947233, 127547675, 679344041, 3618320227, 19271886609, 102645866251, 546712113769, 2911896468083, 15509334488577, 82605772190267, 439974623297369, 2343391557436483, 12481365289466289
Offset: 0
For n=2 the a(2)=37=49-12 sequences contain every combination except these twelve: 01,10,12,21,23,32,34,43,45,54,56,65.
Cf.
A040000,
A003945,
A083318,
A078057,
A003946,
A126358,
A003946,
A055099,
A003947,
A015448,
A126473.
A287804-
A287819.
-
LinearRecurrence[{7, -8, -6, 6}, {1, 7, 37, 197, 1049}, 40]
-
def a(n):
if n in [0,1,2,3,4]:
return [1, 7, 37, 197, 1049][n]
return 7*a(n-1)-8*a(n-2)-6*a(n-3)+6*a(n-4)
A287809
Number of septenary sequences of length n such that no two consecutive terms have distance 2.
Original entry on oeis.org
1, 7, 39, 219, 1231, 6921, 38913, 218789, 1230147, 6916539, 38888455, 218651553, 1229375193, 6912200477, 38864063403, 218514412227, 1228604118319, 6907865088537, 38839687552689, 218377358251349, 1227833528067027, 6903532420748427, 38815326992539159
Offset: 0
For n=2 the a(2)=49-10=39 sequences contain every combination except these ten: 02,20,13,31,24,42,35,53,46,64.
Cf.
A040000,
A003945,
A083318,
A078057,
A003946,
A126358,
A003946,
A055099,
A003947,
A015448,
A126473.
A287804-
A287819.
-
LinearRecurrence[{6, 0, -13, 6}, {1, 7, 39, 219, 1231}, 40]
-
def a(n):
if n in [0, 1, 2, 3, 4]:
return [1, 7, 39, 219, 1231][n]
return 6*a(n-1)-13*a(n-3)+6*a(n-4)
A287810
Number of septenary sequences of length n such that no two consecutive terms have distance 3.
Original entry on oeis.org
1, 7, 41, 241, 1417, 8333, 49005, 288193, 1694833, 9967141, 58615749, 344713305, 2027224169, 11921900829, 70111496093, 412318635697, 2424804301985, 14260029486677, 83861794865077, 493182755657289, 2900358033942041, 17056713010658765, 100308808541321741
Offset: 0
For n=2 the a(2) = 49-8 = 41 sequences contain every combination except these eight: 03, 30, 14, 41, 25, 52, 36, 63.
Cf.
A040000,
A003945,
A083318,
A078057,
A003946,
A126358,
A003946,
A055099,
A003947,
A015448,
A126473.
-
LinearRecurrence[{6, 1, -10}, {1, 7, 41, 241}, 40]
-
def a(n):
if n in [0, 1, 2, 3]:
return [1, 7, 41, 241][n]
return 6*a(n-1)+a(n-2)-10*a(n-3)
A287812
Number of octonary sequences of length n such that no two consecutive terms have distance 1.
Original entry on oeis.org
1, 8, 50, 314, 1972, 12386, 77796, 488636, 3069120, 19277130, 121079578, 760500364, 4776699874, 30002433636, 188445170924, 1183623397912, 7434334035874, 46695023649050, 293291264969380, 1842161313673506, 11570608166423524, 72674945645197500
Offset: 0
For n=2 the a(2) = 64 - 14 = 50 sequences contain every combination except these fourteen: 01,10,12,21,23,32,34,43,45,54,56,65,67,76.
Cf.
A040000,
A003945,
A083318,
A078057,
A003946,
A126358,
A003946,
A055099,
A003947,
A015448,
A126473.
A287804-
A287819.
-
LinearRecurrence[{7, -3, -10, 3}, {1, 8, 50, 314, 1972}, 40]
-
def a(n):
if n in [0, 1, 2, 3, 4]:
return [1, 8, 50, 314, 1972][n]
return 7*a(n-1)-3*a(n-2)-10*a(n-3)+3*a(n-4)
A287813
Number of octonary sequences of length n such that no two consecutive terms have distance 2.
Original entry on oeis.org
1, 8, 52, 340, 2224, 14548, 95164, 622504, 4072036, 26636740, 174241072, 1139777284, 7455717772, 48770692552, 319027694548, 2086881784180, 13651089405616, 89296980486772, 584125595190556, 3820988224873576, 24994540788543364, 163498820845182820
Offset: 0
For n=2 the a(2) = 64 - 12 = 52 sequences contain every combination except these twelve: 02,20,13,31,24,42,35,53,46,64,57,75.
Cf.
A040000,
A003945,
A083318,
A078057,
A003946,
A126358,
A003946,
A055099,
A003947,
A015448,
A126473.
A287804-
A287819.
-
LinearRecurrence[{7, -3}, {1, 8, 52}, 40]
-
def a(n):
if n in [0, 1, 2]:
return [1, 8, 52][n]
return 7*a(n-1)-3*a(n-2)
Comments