As for logic: how are the ticket numbers being converted?
Considering that bug 1 must become task 1, and that RT is still in the 4 digits, maybe it would be enough to make RT(X) become T(X+90000). Then the phabricator-native tasks could start at 100001.
Bug 1 will not become T1, as explained in T857 and https://lists.wikimedia.org/pipermail/wikitech-l/2014-October/079251.html.
RT and Bugzilla tasks will be migrated starting by the first task number available in phabricator.wikimedia.org, and will not attempt to keep any resemblance with their original ticket numbers.