What are the earliest references people have encountered in fiction (either literature or movies) to Blackjack advantage play?
The earliest reference I am aware of is in Robert Heinlein's "Podkayne of Mars" (in my opinion one of the weakest among Heinlein's "Juveniles", but still very entertaining and worth reading). When the novel's heroine arrives with her younger brother in Venusberg (the capital city of Venus, a city with many similarities to today's Las Vegas, except with no laws against underage gambling), the brother - an 11-year-old boy genius - heads to the Blackjack tables, plays for a long time and consistently wins. When she's on a date with a casino executive, they talk about her brother and he says "Don't you imagine that we are giving your brother a break. If he keeps it up long enough, we will not only win it all back but take every buck he started with. If he's as smart as you say he is, he'll quit while he's ahead. But most people aren't that smart - and our corporation never gambles on anything but a sure thing." When she questions her brother about it, he responds "Nothing to it. All those games, somebody wins, somebody loses. I just make sure I'm one who wins".
Now, what's interesting here is that Heinlein completed the manuscript and submitted it for publication in early 1962; shortly *before* the publication of "Beat the Dealer". The novel's publication (as a magazine serial) started in December 1962, a few months after "Beat the Dealer" came out. It is an interesting question (though I'm not sure how to find out) whether Heinlein was aware at the time that Blackjack actually is beatable.

