This is modular arithmetic (clock arithmetic).
d = (1+1288*n)/3 where n is a positive integer (not all positive integers!).
In fact the smallest positive integer for n that gives a positive integer for d is n=2, for which d = 859.
3×859=2577
2577mod1288=1
Generally, n = 2+3k, where k is 0, 1, 2, ... etc. will result in a value of d that satisfies mod(3d,1288)=1
3d≡1mod1288⇒3d=1288m+1⇒1288m+1 must be divisible by 3 without rest!
⇒1288m≡2mod3
here 1288≡1mod3 and 2∗1288≡2mod3
so m=2 and d=1288∗2+13=25773=859
3∗859≡1mod1288
This might seem a little more daunting than it really is....what we're basically saying is that when we take some number "3d" and we divide it by 1288, we get a remainder of "1."
Or, put another way..........3d = 1288n + 1
So we're really looking for some "n" such that 1288n + 1 is divisible by 3.
Note that 1288(1) + 1 = 1289 .... And when I can add the digits of a number and that sum is divisible by 3, then that number is divisible by 3. So when we add the digits of 1289, we get 20,and that's not divisible by 3, so 1289 is not divisible by three.
Now, note that 1288(2) + 1 = 2577. And when we add the digits of 2577, we get 24. That's divisible by 3, so 2577 is divible by 3, and that's what we need!!
So 2577/3 = 859 = d....just as Alan and heureka found!!!
And, as noted by Alan, 3d = 1288n + 1 will hold true for positive integers d and n whenever n = 3k + 2 for k = 0, 1, 2.......