In this paper, for every n∈N, the following relationships between the functions Kb(n) and Ke(n) and the Bernoulli and Euler numbers are proved: B2n=−22n−2(2n)!Kb(n),E2n=(2n)!Ke(n). The functions Kb and Ke are defined recursively by Kb(0)=Ke(0)=1, Kb(n)=−n′=0∑n−1(2(n−n′)+1)!Kb(n′),n≥1, Ke(n)=−n′=0∑n−1(2(n−n′))!Ke(n′),n≥1. Furthermore, we present combinatorial interpretations of these functions in terms of ordered partitions of n: Kb(n)=λ⊨n∑i=1∏ℓ(λ)(2bi+1)!(−1)ℓ(λ),n≥1, Ke(n)=λ⊨n∑i=1∏ℓ(λ)(2bi)!(−1)ℓ(λ),n≥1, where λ=(b1,b2,…,bk)⊨n and ℓ(λ)=k.