Clearly, the first number is 1 and there can be at most three -1's in the sequences. There are possible sequences with at most three -1's. We count the number of invalid sequences of at most three -1's and subtract from 64. Invalid sequences can occur in one of these cases:

Case 1: 1,-1,-1,...

Case 2: 1,1,-1,-1,-1,...

Case 3: 1,-1,1,-1,-1,...

Case 1 can occur in 16 ways, and cases 2 and 3 can occur in 4 ways each (no overlap), and 16+4+4 = 24. Hence the answer is 64-24 = 40.