It first appeared in the form 'ta-ta' as a childish/nursery version of 'Goodbye' in the 1820s. Dickens used another version - 'tar-tar' - in 'The Pickwick Papers' before it took on the form 'ta-ra' as a Northern English version, first appearing in print in Alan Sillitoe's 'Saturday Night and Sunday Morning'.