A047080
Triangular array T read by rows: T(h,k)=number of paths from (0,0) to (k,h-k) using step-vectors (0,1), (1,0), (1,1) with no right angles between pairs of consecutive steps.
Original entry on oeis.org
1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 3, 3, 3, 1, 1, 4, 5, 5, 4, 1, 1, 5, 8, 9, 8, 5, 1, 1, 6, 12, 15, 15, 12, 6, 1, 1, 7, 17, 24, 27, 24, 17, 7, 1, 1, 8, 23, 37, 46, 46, 37, 23, 8, 1, 1, 9, 30, 55, 75, 83, 75, 55, 30, 9, 1, 1, 10, 38, 79, 118, 143, 143, 118, 79, 38, 10, 1
Offset: 0
E.g., row 3 consists of T(3,0)=1; T(3,1)=2; T(3,2)=2; T(3,3)=1.
Triangle begins:
1;
1, 1;
1, 1, 1;
1, 2, 2, 1;
1, 3, 3, 3, 1;
1, 4, 5, 5, 4, 1;
1, 5, 8, 9, 8, 5, 1;
1, 6, 12, 15, 15, 12, 6, 1;
-
F:=Factorial;
p:= func< n,k | (&+[ (-1)^j*F(n+k-3*j)/(F(j)*F(n-2*j)*F(k-2*j)): j in [0..Min(Floor(n/2), Floor(k/2))]]) >;
q:= func< n,k | n eq 0 or k eq 0 select 0 else (&+[ (-1)^j*F(n+k-3*j-2)/(F(j)*F(n-2*j-1)*F(k-2*j-1)) : j in [0..Min(Floor((n-1)/2), Floor((k-1)/2))]]) >;
A:= func< n,k | p(n,k) - q(n,k) >;
A047080:= func< n,k | n eq 0 select 1 else A(n-k, k) >;
[[A(n,k): k in [1..6]]: n in [1..6]];
[A047080(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Oct 30 2022
-
T := proc(n, k) option remember; if n < 0 or k > n then return 0 fi;
if n < 3 then return 1 fi; if k < iquo(n,2) then return T(n, n-k) fi;
T(n-1, k-1) + T(n-1, k) - T(n-4, k-2) end:
seq(seq(T(n,k), k=0..n), n=0..11); # Peter Luschny, Feb 11 2018
-
T[n_, k_] := T[n, k] = Which[n<0 || k>n, 0, n<3, 1, kJean-François Alcover, Jul 30 2018 *)
-
f=factorial
def p(n,k): return sum( (-1)^j*f(n+k-3*j)/(f(j)*f(n-2*j)*f(k-2*j)) for j in range(1+min((n//2), (k//2))) )
def q(n,k): return sum( (-1)^j*f(n+k-3*j-2)/(f(j)*f(n-2*j-1)*f(k-2*j-1)) for j in range(1+min(((n-1)//2), ((k-1)//2))) )
def A(n,k): return p(n,k) - q(n,k)
def A047080(n,k): return A(n-k, k)
flatten([[A047080(n,k) for k in range(n+1)] for n in range(14)]) # G. C. Greubel, Oct 30 2022
Sequence recomputed to correct terms from 23rd onward, and recurrence and generating function added by Michael L. Catalano-Johnson (mcj(AT)pa.wagner.com), Jan 14 2000
A047085
a(n) = T(2*n, n), array T as in A047080.
Original entry on oeis.org
1, 1, 3, 9, 27, 83, 259, 817, 2599, 8323, 26797, 86659, 281287, 915907, 2990383, 9786369, 32092959, 105435607, 346950321, 1143342603, 3772698725, 12463525229, 41218894577, 136451431723, 452116980643, 1499282161375, 4975631425581, 16524213199923, 54913514061867
Offset: 0
-
R:=PowerSeriesRing(Rationals(), 50); Coefficients(R!( Sqrt((1-x)/(1 -3*x-x^2-x^3)) )); // G. C. Greubel, Oct 30 2022
-
CoefficientList[Series[Sqrt[(1-x)/(1-3*x-x^2-x^3)], {x, 0, 50}], x] (* G. C. Greubel, Oct 30 2022 *)
-
def A047085_list(prec):
P. = PowerSeriesRing(ZZ, prec)
return P( sqrt((1-x)/(1-3*x-x^2-x^3)) ).list()
A047085_list(50) # G. C. Greubel, Oct 30 2022
A108626
Antidiagonal sums of square array A108625, in which row n equals the crystal ball sequence for A_n lattice.
Original entry on oeis.org
1, 2, 5, 14, 41, 124, 383, 1200, 3799, 12122, 38919, 125578, 406865, 1322772, 4313155, 14099524, 46192483, 151628090, 498578411, 1641921014, 5414619739, 17878144968, 59097039545, 195548471268, 647665451911, 2146947613286
Offset: 0
Log(A(x)) = 2*x + 6*x^2/2 + 20*x^3/3 + ... + A108627(n)*x^n/n + ...
-
R:=PowerSeriesRing(Rationals(), 40); Coefficients(R!( 1/Sqrt(1-4*x+2*x^2+x^4) )); // G. C. Greubel, Oct 06 2023
-
a := n -> add(binomial(n,k)*hypergeom([-k,k-n,k-n], [1,-n], 1), k=0..n):
seq(simplify(a(n)), n=0..25); # Peter Luschny, Feb 13 2018
-
CoefficientList[Series[1/Sqrt[x^4+2*x^2-4*x+1], {x, 0, 50}], x] (* Vincenzo Librandi, Nov 08 2014 *)
-
a(n)=sum(k=0,n,sum(i=0,k,binomial(n-k,i)^2*binomial(n-i,k-i)))
-
{a(n)=polcoeff( sum(m=0, n, x^m * sum(k=0, m, binomial(m, k)^2 * x^k) / (1-x +x*O(x^n))^(m+1)) , n)}
for(n=0, 30, print1(a(n), ", ")) \\ Paul D. Hanna, Nov 08 2014
-
def A108626_list(prec):
P. = PowerSeriesRing(ZZ, prec)
return P( 1/sqrt(1-4*x+2*x^2+x^4) ).list()
A108626_list(40) # G. C. Greubel, Oct 06 2023
A180091
a(m,n) is the number of ways to split two strings of length m and n, respectively, into the same number of nonempty parts such that at least one of the corresponding parts has length 1.
Original entry on oeis.org
1, 1, 1, 1, 2, 3, 1, 3, 5, 9, 1, 4, 8, 15, 27, 1, 5, 12, 24, 46, 83, 1, 6, 17, 37, 75, 143, 259, 1, 7, 23, 55, 118, 237, 450, 817, 1, 8, 30, 79, 180, 380, 755, 1429, 2599, 1, 9, 38, 110, 267, 592, 1229, 2421, 4570, 8323
Offset: 1
For m=4, n=3, the 5 possibilities are:
a) X XXX b) XXX X c) X XX X d) XX X X e) X X XX
YY Y Y YY Y Y Y Y Y Y Y Y Y
The triangle a(m,n) starts in row m=1 with columns 1 <= n <= m as:
1;
1, 1;
1, 2, 3;
1, 3, 5, 9;
1, 4, 8, 15, 27;
1, 5, 12, 24, 46, 83;
1, 6, 17, 37, 75, 143, 259;
1, 7, 23, 55, 118, 237, 450, 817;
1, 8, 30, 79, 180, 380, 755, 1429, 2599;
1, 9, 38, 110, 267, 592, 1229, 2421, 4570, 8323;
1, 10, 47, 149, 386, 899, 1948, 3989, 7804, 14698, 26797;
1, 11, 57, 197, 545, 1334, 3015, 6412, 12987, 25264, 47491, 86659;
From _Julien Rouyer_, Jun 02 2023: (Start)
There are a(5)=T(3,2)=5 strictly increasing functions defined on a part of {1,2,3} that take values in {1,2} and can't be extended keeping the same properties. The 5 functions are defined by
f(1)=1, f(2)=2;
g(1)=1, g(2)=3;
h(1)=2, h(2)=3;
i(1)=3;
j(2)=1. (End)
- D. Bouyssou, T. Marchant, and M. Pirlot, About maximal antichains in a product of two chains:A catch-all note, arXiv:2410.16243 [math.CO], 2024. See pp. 1, 3, 16-18.
- M. A. Covington, The Number of Distinct Alignments of Two Strings, Journal of Quantitative Linguistics, Vol. 11 (2004), Issue 3, pp. 173-182.
- S. Eger, Derivation of sequence [broken link]
-
A180091 := proc(m,n) a := binomial(m-1,n-1); for k from 2 to n-1 do for l from 1 to k-1 do if k-l-1 >= 0 and k-l-1 <= n-k-1 and l-1 >=0 and l-1 <= m+l-k-1 then a := a+ binomial(k,l)*binomial(n-k-1,k-l-1)*binomial(m+l-k-1,l-1); end if; end do: end do: a; end proc: # R. J. Mathar, Feb 01 2011
-
# The following program gives T(m,n)=a(m+1,n+1) for any m >= 0 and n >= 0:
def T(m,n):
if n == 0:
res = 1
elif n == 1:
res = max(m,n)
elif m < n:
res = T(n,m)
else:
res = 0
for i in range(1,m+1):
res += T(m-i,n-1)
for j in range(2,n+1):
res += T(m-1,n-j)
return res # Julien Rouyer, Jun 02 2023
A171158
The number of walks from (0,0,0) to (n,n,n) with steps that increment one to three coordinates and having the property that no two consecutive steps are orthogonal.
Original entry on oeis.org
1, 1, 19, 235, 3181, 44725, 648439, 9614329, 145020445, 2217212539, 34269961873, 534449721793, 8397498847645, 132785160326593, 2111135363144743, 33723822603109987, 540949658114010583, 8708952402795685879, 140665766088396528829, 2278642960112808284773
Offset: 0
For n = 2, the 19 walks are:
000 -> 001 -> 012 -> 122 -> 222
000 -> 001 -> 102 -> 212 -> 222
000 -> 001 -> 112 -> 222
000 -> 010 -> 021 -> 122 -> 222
000 -> 010 -> 120 -> 221 -> 222
000 -> 010 -> 121 -> 222
000 -> 011 -> 112 -> 222
000 -> 011 -> 121 -> 222
000 -> 011 -> 122 -> 222
000 -> 100 -> 201 -> 212 -> 222
000 -> 100 -> 210 -> 221 -> 222
000 -> 100 -> 211 -> 222
000 -> 101 -> 112 -> 222
000 -> 101 -> 211 -> 222
000 -> 101 -> 212 -> 222
000 -> 110 -> 121 -> 222
000 -> 110 -> 211 -> 222
000 -> 110 -> 221 -> 222
000 -> 111 -> 222
See
A171155 for the number of such walks in two dimensions.
A171563
The number of walks from (0,0,0,0) to (n,n,n,n) with steps that increment one to four coordinates and having the property that no two consecutive steps are orthogonal.
Original entry on oeis.org
1, 1, 183, 12645, 985035, 81827267, 7118644591, 640769321689, 59196873690319, 5581678517756599, 535018115452292125, 51979823843828063203, 5107397983259866484167, 506660924932346216388835, 50675683529411401757497171, 5104747391125384906330663869
Offset: 0
See
A171155 and
A171158 for the number of such walks in two dimensions and in three dimensions.
Showing 1-6 of 6 results.
Comments