Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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!)
A160138 a(n) = number of solutions to the system: x + y + z + w = n, -2x - y + z + 2w = 5 with nonnegative x, y, z, w. 2
0, 0, 1, 2, 3, 4, 6, 7, 9, 11, 13, 15, 18, 20, 23, 26, 29, 32, 36, 39, 43, 47, 51, 55, 60, 64, 69, 74, 79, 84, 90, 95, 101, 107, 113, 119, 126, 132, 139, 146, 153, 160, 168, 175, 183, 191, 199, 207, 216, 224, 233, 242, 251, 260, 270, 279, 289, 299, 309, 319, 330, 340 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
Number of ways in which playing n one-card-poker games results in a payoff of $5.
x = # of games where player loses $2,
y = # of games where player loses $1,
z = # of games where player wins $1,
w = # of games where player wins $2.
The events i.e. winning $1, losing $2 etc. are mutually exclusive.
Hence in n games
x+y+z+w = n
-2x-y+z+2w = $5
LINKS
FORMULA
From Andrew Howroyd, Jan 12 2020: (Start)
a(n) = A253186(n-1).
a(n) = a(n-1) + a(n-2) - a(n-4) - a(n-5) + a(n-6) for n > 6.
G.f.: x^3*(1 + x - x^3)/((1 - x)^3*(1 + x)*(1 + x + x^2)).
(End)
EXAMPLE
For n = 3, a(3) = 1, since the four-tuple <x=0, y=0, z=1, w=2> allows you to win $5 in 3 games. x + y + z + w = 1 + 2 =3, -2x - y + z + 2w = 1 + 2*2 = 5, as desired.
MAPLE
> fourples2 := proc (n) local i, c1, c2, c3, c4, c3positive, mylist, cash, k, howmanyways; cash := 2*n; for k from -cash to cash do i := 0; unassign(mylist); for c1 from 0 to n do c3positive := true; for c2 from 0 to n-c1 while c3positive do c3 := 2*n-4*c1-3*c2-k; if 0 <= c3 then c4 := n-c1-c2-c3; if 0 <= c4 then i := i+1; mylist[i] := [c1, c2, c3, c4] end if else c3positive := false end if end do end do; howmanyways[k] := [i, [seq(mylist[j], j = 1 .. i)]] end do; return howmanyways end proc; N := 20; for n to N do a := fourples2(n); points[n] := [n, a[5][1]] end do; seq(points[n], n = 1 .. N);
MATHEMATICA
LinearRecurrence[{1, 1, 0, -1, -1, 1}, {0, 0, 1, 2, 3, 4}, 100] (* Jean-François Alcover, Apr 11 2020 *)
PROG
(PARI) concat([0, 0], Vec((1 + x - x^3)/((1 - x)^3*(1 + x)*(1 + x + x^2)) + O(x^60))) \\ Andrew Howroyd, Jan 12 2020
CROSSREFS
Cf. A008806 is the number of ways in which playing n one-card-poker games results in a payoff of $0, i.e., the n-th term is the number of solutions to the system: x + y + z + w = n, -2x - y + z + 2w = 0, with nonnegative x, y, z, w.
Except for offset, same as A253186.
Sequence in context: A011865 A085680 A253186 * A321195 A249020 A258470
KEYWORD
nonn
AUTHOR
Krishnan Sundararaman (krishnan.sundararaman(AT)enmu.edu), May 02 2009
EXTENSIONS
Terms a(13) and beyond from Andrew Howroyd, Jan 12 2020
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 August 18 15:26 EDT 2024. Contains 375269 sequences. (Running on oeis4.)