Consider the sequence S(x) = 2^x - 1. This sequence has two interesting properties:
a) If the GCD of S(x) and S(y) is S(gcd(x,y)), and
b) For any prime p, S(p-1) is divisible by p.
Property a follows from the fact that if 2^x is 1 mod n and 2^y is 1 mod n, 2^(gcd(x,y)) is 1 mod n. Property b follows from Fermat's little theorem.
I am interested in sequences that exhibit property a but also have a modified form of property b such as b*) For any prime p, S(p-2) is divisible by p.
Does anyone know of any such sequences?