What is the number if it divides exactly by 13 and when you write its digits in reverse order you make a square number. (You get a square number when you multiply a number by itself - 64 is square because it is 8 times 8)

Find a way to write the digits 1 through 9 in sequence, so that the numbers determined by any two consecutive digits are divisible either by 7 or by 13.