login
Composite numbers k such that P(k, 5) == 5 (mod k), where P(k, 5) = A006442(k) is the k-th Legendre polynomial evaluated at 5.
0

%I #22 Sep 11 2023 18:37:07

%S 4,15,35,165,255,615,1815,1876,2636,2948,5380,5565,11235,28545,288380,

%T 903644,1807995,2486165,2674060,10538572,11791595,14145121,28558415,

%U 45153277,45682751

%N Composite numbers k such that P(k, 5) == 5 (mod k), where P(k, 5) = A006442(k) is the k-th Legendre polynomial evaluated at 5.

%C P(p, 5) == 5 (mod p) for all primes p. This is a special case of Schur congruences (see A330203 for references). This sequence consists of the composite numbers for which the congruence holds.

%e 4 is in the sequence since it is composite and P(4, 5) = 2641 == 5 (mod 4).

%t Select[Range[3000], CompositeQ[#] && Divisible[LegendreP[#, 5] - 5, #] &]

%o (PARI) isok(k) = Mod(subst(pollegendre(k), x, 5), k) == 5;

%o forcomposite (k=1, 10000, if (isok(k), print1(k, ", "))); \\ _Michel Marcus_, Dec 06 2019

%o (Sage)

%o a, b = 1, 5

%o for n in range(2, 10000):

%o a, b = b, ((10*n-5)*b - (n-1)*a)//n

%o if (b%n == 5%n) and (not Integer(n).is_prime()): print(n) # _Robin Visser_, Aug 17 2023

%Y Cf. A006442, A008316, A330203.

%K nonn,more

%O 1,1

%A _Amiram Eldar_, Dec 05 2019

%E a(22)-a(23) from _Robin Visser_, Aug 17 2023

%E a(24)-a(25) from _Robin Visser_, Sep 11 2023