In the middle of the 18th century, the Italian craze for lotteries swept the European continent. It was thus that an Italian named Roccolini approached Frederick the Great of Prussia in 1749 with a scheme to establish a Genoesestyle lottery in Berlin. This was some eight years after Leonard Euler had come to Frederick's court from St. Petersburg. The king, as was his custom when mathematical matters were involved, called upon Euler for counsel.
Euler was already working on a royal assignment when Frederick's letter of 15 September 1749 arrived, along with a copy of Roccolini's proposal for the Berlin lottery. Euler set aside the earlier assignment  the design of a new hydraulic system for Frederick's summer palace, SansSouci  and two days later returned his analysis of the proposal to the king.
Roccolini's proposal involved the usual drawing of 5 numbers from a list of 90 and offered three principal ways for gamblers to place their wagers:
 simple
 The player chooses one number between 1 and 90 and pays 8 écus to play. If the chosen number is among the 5 numbers drawn, the player wins 100 écus.

 ambo
 The player chooses two numbers between 1 and 90 and pays 14 gros to play. If both the chosen numbers are among the 5 numbers drawn, the player wins 120 écus.

 terno
 The player chooses three numbers between 1 and 90 and pays 15 deniers to play. If all three of the chosen numbers are among the 5 numbers drawn, the player wins 180 écus.
The terms
ambo and
terno were used in Italian lotteries, where the simple bet was called
ambata. The
écu was a French silver coin, worth 3 francs. It was divided into 24
gros, which were in turn each divided into 12 copper
deniers. Thus 1
écu = 24
gros = 288
deniers and 1
gros = 12
deniers. Subsequently, all fractional parts of
écus will be given as decimals, although Euler did not do this in his report of September 17.
It was also possible to place mixed bets, but apparently the proposal didn't specify the price of such tickets. Frederick's charge and Euler's response are reproduced in Volume IVA.6 of the Opera Omnia [10, pp. 316320], but unfortunately Roccolini's proposal is not included.
Euler's analysis began with a calculation of the fair price of each type of ticket, "according to the law of equality". In other words, he calculated the expected value of the payoff in each case. Table 1 summarizes his findings. In this 1749 letter, Euler determined the bank's profit using the formula
where
E is the expected value and
P is price of a ticket. In his 1763 paper "Reflections on
¼ the Genoese Lottery", which we will discuss in the next section, he uses
to measure that bank's profit.
Type 
Probability 

Expected 
Price of 
The Bank's 
The Bank's 
of bet 
of a win 
Prize 
Value 
a Ticket 
Profit (1749) 
Profit (1763) 

simple 

100 
5 5/9 
8 
44% 
31% 

ambo 

120 
0.2996 
0.5833 
95% 
49% 

terno 

180 
0.01532 
0.05208 
240% 
71% 

Table 1: Summary of Euler's Analysis 