Half an evening of Sammy Davis Jr. and half an evening of Bill Cosby - that is the musical sum and comic substance of ''Two Friends - Sammy and Cos.'' The two halves added up to the kind of irresistible entertainment that brought pleasure and delight to an opening-night audience at the Gershwin Theatre.
The evening started off with a spot of prearranged persiflage as the two stars emerged - Mr. Davis, wearing a jazzy Cosby-type sweater with his gray suit , while Mr. Cosby sported a dinner jacket and a few gold baubles. Thereafter, Mr. Cosby left the stage to his friend and to a splendid stage orchestra, to which, in due course, the singer paid vocal tribute.
Mr. Davis has long since mastered the art of the precisely controlled effect. A large and powerful voice (marred only by some strident overamplification) emerges from this small, trim, deftly graceful man. Mr. Davis was neat before the word became a superlative. In whatever sense you may wish to use the word, he is still neat.
As he intersperses songs with personal reminiscences and incidental patter, Mr. Davis creates a sense of intimacy even in a cavernous space like the Gershwin. A New Yorker who grew up in Harlem, the singer makes much of his return to the city of his birth. As for the songs, they include ''It Only Takes a Moment,'' ''I Gotta Be Me,'' and ''And I'm Telling You I'm Not Going'' (from ''Dream Girls''), whose heartbreaking protest he proves can be delivered as effectively by a man as by a woman.
The Davis repertoire at the Gershwin favors show tunes, among them several from Broadway musicals in which he has appeared. The jaunty entertainer includes the works of such musicmakers as Styne, Porter, Adler-Ross, Bricusse-Newley, and Gershwin, to name a few.
The first half of ''Two Friends'' concludes with Mr. Cosby's return to announce, as he dons a pair of sneakers, that he is going to perform ''Mr. Bojangles'' as a tribute to his fellow star. The two entertainers make the most of the momentary comic standoff between the tall and rather imposing Cos and diminutive but by no means dominated Sammy.
Part II consists mainly of an extended version of Mr. Cosby's incredibly funny confessions (if that is the word) of a husband, father of five, disciplinarian, sex educator, and reminiscer about his own parents. This kind of comic material can be hugely relished but scarcely described. It's recurrent theme is what happened to the Cosbys' romantic marital dream of ''skipping through the grass in slow motion.''
Mr. Cosby scarcely ever rises from his center-stage chair in the course of this lengthy, explosive monologue. Expanding upon the trials and tribulations of domestic life, he encompasses an assortment of subjects ranging from Washington and Franklin to the inflated costs of college education.
Before the final curtain, ''Two Friends'' allows for some welcome tap dancing (to ''Singin' in the Rain'') by Mr. Davis. It should be added that opening night - a benefit for the Dance Theatre of Harlem - was further enlivened by the arrival of presidential hopeful Jesse Jackson and entourage and the post-performance tribute to Cab Calloway on his 75th birthday.
All in all, an occasion to remember, when ''Two Friends'' and their friends got together. Sammy and Cos will be receiving at the Gershwin through Nov. 12.