%I #8 Jun 22 2024 22:40:51
%S 49,111,343,561,637,905,1105,1519,1729,2465,2613,2821,4017,6517,6601,
%T 8029,8911,10585,10621,11973,15841,20091,20301,29341,41041,46657,
%U 47677,52633,54145,62745,63973,75361,94285,99269,101101,101185,115921,126217,134113,138229
%N Odd composite numbers k such that Sum_{i=1..k-1} 2^i * i^(k-2) == Sum_{i=1..(k-1)/2} i^(k-2) (mod k).
%C The congruence holds for all odd primes (A065091).
%C Apparently, all the Carmichael numbers (A002997) are terms (checked for the first 500 Carmichael numbers).
%H Christopher J. Hillar, <a href="https://www.jstor.org/stable/2589690">Problem 10723</a>, The American Mathematical Monthly, Vol. 106, No. 3 (1999), p. 265; <a href="http://www.jstor.org/stable/2695543">Two Sums That Are Congruent Modulo p</a>, solution to Problem 10723 by Heinz-Jiirgen Seiffert, ibid., Vol. 108, No. 2 (2001), p. 176.
%t 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]
%o (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));
%Y Cf. A002997, A065091.
%K nonn
%O 1,1
%A _Amiram Eldar_, Jun 18 2024