This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A209877 #21 Jul 27 2020 15:16:24 %S A209877 1,4,2,6,3,16,15,25,23,17,11,5,38,49,50,22,14,40,81,56,7,61,72,32,8, %T A209877 41,30,114,69,144,57,74,68,21,52,137,167,10,133,196,127,191,174,24, %U A209877 104,143,26,59,43,12,258,238,289,97,77,252,53,29,13,283,48,190,335,361,31,228,291,159,263,123,260,325,363,247,162 %N A209877 a(n) = A209874(n)/2: Least m > 0 such that 4*m^2 = -1 modulo the Pythagorean prime A002144(n). %C A209877 Also: Square root of -1/4 in Z/pZ, for Pythagorean primes p=A002144(n). %C A209877 Also: Least m>0 such that the Pythagorean prime p=A002144(n) divides 4(kp +/- m)^2+1 for all k>=0. %C A209877 In practice these can also be determined by searching the least N^2+1 whose least prime factor is p=A002144(n): For given p, all of these N will have a(n) or p-a(n) as remainder mod 2p. %H A209877 Robert Israel, <a href="/A209877/b209877.txt">Table of n, a(n) for n = 1..10000</a> %e A209877 a(1)=1 since A002144(1)=5 and 4*1^2+1 is divisible by 5; as a consequence 4*(5k+/-1)^2+1 = 100k^2 +/- 40k + 5 is divisible by 5 for all k. %e A209877 a(2)=4 since A002144(2)=13 and 4*4^2+1 = 65 is divisible by 13, while 4*1^1+1=5, 4*2^2+1=17 and 4*3^2+1=37 are not. As a consequence, 4*(13k+/-4)^2+1 = 13(...)+4*4^1+1 is divisible by 13 for all k. %p A209877 f:= proc(p) local m; %p A209877 if not isprime(p) then return NULL fi; %p A209877 m:= numtheory:-msqrt(-1/4, p); %p A209877 min(m,p-m); %p A209877 end proc: %p A209877 map(f, [seq(i,i=5..1000,4)]); # _Robert Israel_, Mar 13 2018 %t A209877 f[p_] := Module[{r}, r /. Solve[4 r^2 == -1, r, Modulus -> p] // Min]; %t A209877 f /@ Select[4 Range[300] + 1, PrimeQ] (* _Jean-François Alcover_, Jul 27 2020 *) %o A209877 (PARI) apply(p->lift(sqrt(Mod(-1,p)/4)), A002144) %Y A209877 Cf. A209874. %Y A209877 Cf. A002496, A014442, A085722, A144255, A089120, A193432. %Y A209877 Cf. A002314, A177979. %K A209877 nonn %O A209877 1,2 %A A209877 _M. F. Hasler_, Mar 14 2012