OFFSET
1,1
COMMENTS
LINKS
Christopher J. Hillar, Problem 10723, The American Mathematical Monthly, Vol. 106, No. 3 (1999), p. 265; Two Sums That Are Congruent Modulo p, solution to Problem 10723 by Heinz-Jiirgen Seiffert, ibid., Vol. 108, No. 2 (2001), p. 176.
MATHEMATICA
f[p_] := Sum[PowerMod[2, i, p]*PowerMod[i, p - 2, p], {i, 1, p - 1}] - Sum[PowerMod[i, p - 2, p], {i, 1, (p - 1)/2}]; q[p_] := CompositeQ[p] && Divisible[f[p], p]; Select[Range[1, 10000, 2], q]
PROG
(PARI) is(k) = (k > 1) && (k % 2) && !isprime(k) && sum(i = 1, k-1, Mod(2, k)^i * Mod(i, k)^(k-2)) == sum(i = 1, (k-1)/2, Mod(i, k)^(k-2));
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Jun 18 2024
STATUS
approved