A356169 a(n) = n - gcd(n, A003961(A356164(n))), where A356164(n) is the smallest positive k such that n divides k*A003961(k), and A003961 is fully multiplicative with a(p) = nextprime(p).
0, 1, 0, 3, 0, 3, 0, 7, 0, 5, 0, 9, 0, 7, 10, 15, 0, 9, 0, 15, 0, 11, 0, 21, 0, 13, 0, 21, 0, 15, 0, 31, 0, 17, 28, 27, 0, 19, 0, 35, 0, 21, 0, 33, 30, 23, 0, 45, 0, 25, 0, 39, 0, 27, 0, 49, 0, 29, 0, 45, 0, 31, 0, 63, 0, 33, 0, 51, 0, 63, 0, 63, 0, 37, 50, 57, 66, 39, 0, 75, 0, 41, 0, 63, 0, 43, 0, 77, 0, 75, 0, 69
Offset: 1