OFFSET
2,2
COMMENTS
If we let p=2n+1 run through all odd numbers >=3 and consider only i coprime to p, the sequence becomes 0, 2, 0, 4, 4, 6, 0, 10, 4, 4, 12, 14, 8, 18, 4, 12, 12, 14, 8, 18... [R. J. Mathar, Aug 07 2010]
REFERENCES
R. K. Guy, Unsolved Problems in Number Theory, F12.
LINKS
T. D. Noe, Table of n, a(n) for n = 2..1000
Yaming Lu and Yuan Yi, On the generalization of the D. H. Lehmer problem II, Acta Arithm. vol 142 no 2 (2010), 179-186.
Yuan Yi and Zhang Wen-peng, On the generalization of a problem of D. H. Lehmer, Kyushu J. Math., 56 (2002) 235-241; MR 2003g:11112.
EXAMPLE
For p = 13, the pairs are (2,7), (5,8), (6,11) and their reversals. So a(6) = 6.
MATHEMATICA
f[n_] := Length[ Select[ Mod[ Flatten[ Table[i*j, {j, 2, n - 1}, {i, j - 1, 1, -2}], 1], n], # == 1 & ]]; 2Table[ f[ Prime[n]], {n, 2, 70}]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, based on a suggestion of R. K. Guy, Jul 11 2003
EXTENSIONS
Extended by Vladeta Jovovic and Robert G. Wilson v, Jul 12 2003
Removed the "odd" attribute from the primes in the definition (see the offset) - R. J. Mathar, Aug 07 2010
STATUS
approved