A343240 The number of solutions x from {0, 1, ..., A343238(n)-1} of the congruence x^2 + 5 == 0 (mod A343238(n)) is given by a(n).
1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 4, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 4, 4, 2, 4, 2, 2, 4, 4, 2, 4, 2, 4, 2, 2, 2, 2, 4, 2, 2, 4, 4, 4, 2, 4, 2, 2, 4
Offset: 1
Examples
a(19) = 4 because A343238(19) = 42 = 2*3*7 has 2^(1+1) = 4 solutions from the primes 3 and 7.
Programs
-
PARI
isok(k) = issquare(Mod(-5, k)); \\ A343238 lista(nn) = my(list = List()); for (n=1, nn, if (issquare(Mod(-5, n)), listput(list, sum(i=0, n-1, Mod(i,n)^2 + 5 == 0)););); Vec(list); \\ Michel Marcus, Sep 17 2023
Comments