login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A239700 Given: 1. alphabet of 3 elements {x1,x2,x3}; 2. vector V of size L(V) = 10; Let w(x1) = number of failed trials before the last event x1. For all the possible configurations {w(x1),w(x2),w(x3)} admitted in vectors of L(V)=10, the sequence gives the number of vectors having the same configuration {w(x1),w(x2),w(x3)}. 1
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 7, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,94
LINKS
FORMULA
a(n) = {i, j, k} : i + j + k = Z;
b(j) = P(A(j));
b(j, k,V) = i;
b(j, k,X) = j;
b(j, k,Y) = k;
for each b(j):
Sum[p_1^i*p_2^j*p_3^k[
Sum[q_V^(d - i)*q_X^(e - j)*q_Y^(g - k)*
Sum[((d - 1)!*Abs[e - d - 1]!)/((i - 1)!* f!*(d - i - f)!*(j - f - 1)!*(e - d - j + f)!), {f, j - Min[j, e - d], 1}],
{d, i, i + j + k - 2}, {e,Max[i + j, d], i + j + k - 1}, {g, i + j + k, i + j + k}]],
{i, 1, Z}, {j, 1, Z - i}, {k, 1, -i - j + Z}]
The series is obtained by taking the coefficients of the polynomials, sorted in lexicographic order, on the exponents of p_1, p_2, p_3.
EXAMPLE:
Z = 10;
a(1)= {1, 1, 8}; a(2) = {1, 2, 7}; a(3)= {1, 3, 6};
b(2)= P(a(2)) = {{1, 2, 7}, {1, 7, 2}, {2, 1, 7}, {2, 7, 1}, {7, 1, 2}, {7, 2, 1}};
i = 1; j = 7; k = 2;
b(2,3)= {2, 1, 7};
b(2,3,V) = 1 -> V = 2;
b(2, 3,X) = 7 -> X = 3;
b(2, 3,Y) = 2 -> Y = 1;
EXAMPLE
Example:
alphabet = {a,b,c};
w(a)=7;
w(b)=5;
w(c)=5;
The number of vectors for which {w(a)=7,w(b)=5,w(c)=5}= 210.
MATHEMATICA
getW[data_, p_] := Block[{p1, p1f, resq},
p1 = Position[data, p];
If[p1 == {}, Return[{{p, 0}, {p, 0}}]];
p1f = Flatten[p1];
resq = {#[[2]] - #[[1]] - 1} & /@ Partition[PrependTo[p1f, 1], 2, 1];
resq[[1]] += 1;
Return[{Select[Tally[data], #[[1]] == p &][[1]], {p,
Plus @@ Flatten[resq]}}]
];
getMonomials[listOfVars_, dL_] := Block[{data, vars, coeff, res},
data = Tuples[listOfVars, dL];
vars =
Thread[{Table[Subscript[p, i], {i, 1, Length[listOfVars]}],
Table[Subscript[q, i], {i, 1, Length[listOfVars]}]}];
coeff =
Table[Thread[getW[data[[i]], #] & /@ listOfVars], {i, 1, Length[data]}];
coeff = #[[All, 2]] & /@ Thread[#] & /@ coeff;
res = Times @@ MapThread[Times, MapThread[Power, {vars, #}]] & /@ coeff;
Return[res];
];
(*select monomials for which all the variables occur at least one time *)
SIZE = 10;
results =
Select[getMonomials[{v1, v2, v3},
SIZE], (Exponent[#, Subscript[p, 1]] >
0) && (Exponent[#, Subscript[p, 2]] > 0) &&
Exponent[#, Subscript[p, 3]] > 0 &];
(*group monomials by same # events realization*)
results =
Gather[results, (Exponent[#1, Subscript[p, 1]] ==
Exponent[#2, Subscript[p, 1]]) && (Exponent[#1, Subscript[p, 2]] ==
Exponent[#2, Subscript[p, 2]]) && (Exponent[#1, Subscript[p, 3]] ==
Exponent[#2, Subscript[p, 3]]) &];
(*sort monomials by lexicographic order on event v1 and v2*)
results = {#[[1, 1 ;; 3]], #[[All, 4 ;; -1]]} & /@ results;
results = Reverse[Sort[results]];
(*polynomial*)
qVals = Plus @@ #[[2]] & /@ results;
(*get coefficients*)
coeff = Table[
If[IntegerQ[qVals[[i]][[j, 1]]] == True, qVals[[i]][[j, 1]], 1], {i, 1,
Length[qVals]}, {j, 1, Length[qVals[[i]]]}];
CROSSREFS
Sequence in context: A319101 A354487 A336699 * A304906 A055061 A074465
KEYWORD
nonn
AUTHOR
Cristian Mesiano, Mar 24 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)