A135490
Number of tieless basketball games from the years 1967-present with n scoring events.
Original entry on oeis.org
1, 6, 30, 162, 886, 4932, 27714, 157018, 894942, 5126268, 29481732, 170128850, 984577446, 5712117772, 33210790018, 193456179430, 1128789904110, 6596174575548, 38596967873100, 226120320617484, 1326180436400932
Offset: 0
Sequence discovered by the students of D. Zeilberger's course (avitalo(AT)math.rutgers.edu), Feb 07 2008
-
TieLessGamesGeneral := proc(S, n, k) local s; option remember; if n = 0 then if k = 0 then return 1; else return 0; fi; fi; if k = 0 then return 0; fi; return add(TieLessGamesGeneral(S, n-1, k-s), s in S); end: TieLessGames := proc(S, n) local k, Smin, Smax; Smin := min(op(S)); Smax := max(op(S)); return add(TieLessGamesGeneral(S, n, k), k = Smin*n..Smax*n); end: TieLessOldBasketballGames := proc(n) return TieLessGames({1, 2, 3, -1, -2, -3}, n); end:
A135489
Number of tieless basketball games from the years 1896-1967 with n scoring events.
Original entry on oeis.org
1, 4, 12, 42, 148, 540, 1990, 7434, 27972, 106008, 403764, 1544796, 5931486, 22846252, 88228998, 341518606, 1324627044, 5146959168, 20030812360, 78066774400, 304643526276, 1190209498344, 4654949367204, 18223301727108
Offset: 0
Sequence discovered by the students of D. Zeilberger's course (avitalo(AT)math.rutgers.edu), Feb 07 2008
-
TieLessGamesGeneral := proc(S, n, k) local s; option remember; if n = 0 then if k = 0 then return 1; else return 0; fi; fi; if k = 0 then return 0; fi; return add(TieLessGamesGeneral(S, n-1, k-s), s in S); end: TieLessGames := proc(S, n) local k, Smin, Smax; Smin := min(op(S)); Smax := max(op(S)); return add(TieLessGamesGeneral(S, n, k), k = Smin*n..Smax*n); end: TieLessOldBasketballGames := proc(n) return TieLessGames({1, 2, -1, -2}, n); end:
A334288
Number of tieless rugby (union) games with n scoring events.
Original entry on oeis.org
1, 6, 30, 180, 1002, 6012, 34224, 205344, 1180010, 7080060, 40911324, 245467944, 1423944024, 8543664144, 49710351720, 298262110320, 1739627237002, 10437763422012, 61002039226716, 366012235360296, 2142786218045748, 12856717308274488, 75380119335678608
Offset: 0
a(2)=30, because there are 6^2=36 sequences of length 2 from {3,5,7,-3,-5,-7}; the 6 sequences that correspond to games with ties are precisely those of the form {k,-k}.
-
def number_of_tieless_rugby_games(n):
"""
Returns the number of tieless rugby games with n scoring events.
A scoring event is a number in (-7,-5,-3,3,5,7) and a game is tieless
if the score is never zero, apart from at the start.
Negative points represent points for the away team, positive points
represent points for the home team
"""
dictionary_of_scores = {0:1}
# The keys of this dictionary represent possible scores.
# The values represent the number of ways this score can be reached.
scoring_events = (-7,-5,-3,3,5,7)
for i in range(n):
# At each stage, we have the nonzero scores with i scoring events in
# dictionary_of_scores. To find nonzero scores with i+1 scoring events
# consider each nonzero score, and each possibility for the next
# scoring event.
old_dictionary = dictionary_of_scores
dictionary_of_scores = {}
for score, number_of_ways in old_dictionary.items():
for scoring_event in scoring_events:
new_score = score + scoring_event
if new_score != 0:
dictionary_of_scores[new_score] =\
dictionary_of_scores.get(new_score, 0) + number_of_ways
return sum(dictionary_of_scores.values())
A335974
Number of tieless quidditch games with n scoring events.
Original entry on oeis.org
2, 4, 4, 8, 12, 24, 40, 80, 140, 280, 504, 1008, 1848, 3696, 6864, 13726, 25740, 51450, 97240, 194210, 369512, 737124, 1410864, 2810178, 5408312, 10752868, 20801200, 41273500, 80233200, 158851800, 310235040, 612835830, 1202160780, 2369260560, 4667212440
Offset: 1
a(3) = 4 because to avoid a tie after two scoring events, the same team must score the first two goals, i.e., the game starts (+10,+10) or (-10,-10). Then there are two options for who catches the snitch. So the tieless games with three scoring events are (-10,-10,-150), (-10,-10,+150), (+10,+10,-150) and (+10,+10,+150).
- J. K. Rowling, Harry Potter and the Philosopher's Stone, Chapter 10, Bloomsbury, 1997.
Inspired by
A137684 and Robin Smyrl.
Tieless games:
A137684 (American football),
A135490 (basketball),
A135489 (basketball 1896-1967),
A334288 (rugby union), this sequence (quidditch).
-
def number_of_tieless_quidditch_games(n):
"""
Takes an integer n, and returns a list containing the number of tieless
quidditch games with 1, 2, 3 .... n scoring events.
Note, the last scoring event is always catching the snitch, which gives
+150 if the home team caught it, or -150 if the away team caught it.
All scoring events prior to the snitch being caught are worth +10 or -10.
"""
dictionary_of_scores = {0:1}
# The keys of this dictionary represent possible scores.
# The values represent the number of ways this score can be reached with
# the game being tieless.
list_to_return = []
for i in range(n):
# We have a dictionary of tieless games with i ten point scoring events.
# Check still tieless after snitch catch
number_of_tieless_games = 0
for score, number_of_ways in dictionary_of_scores.items():
if score != 150: # away team can catch snitch without a tie
number_of_tieless_games += number_of_ways
if score != -150: # home team can catch snitch without a tie
number_of_tieless_games += number_of_ways
list_to_return.append(number_of_tieless_games)
# Update dictionary to have one more ten point scoring event
old_dictionary = dictionary_of_scores
dictionary_of_scores = {}
for scoring_event in (-10, 10):
for score, number_of_ways in old_dictionary.items():
new_score = score + scoring_event
if score + scoring_event != 0:
dictionary_of_scores[new_score] =\
dictionary_of_scores.get(new_score,0) + number_of_ways
return list_to_return
Showing 1-4 of 4 results.
Comments