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 A244290 #61 Sep 11 2021 21:26:23 %S A244290 5,2,2,53,5,173,2,17,2,29,13,5,1697,53,2,73,13,5,37,2,389,733,2753,89, %T A244290 17,1093,773,13,397,1789,2,41,821,53,5,29,193,281,6257,173,2,149,593, %U A244290 701,5,1289,157,5,7993,13,2213,449,877,2,61,37,389,17,5,24061 %N A244290 Smallest prime a(n) = x^2 + y^2 such that c^2 + d^2 = A002313(n) and c*x + d*y = 1, where c,d,x,y are integers. %C A244290 Let c^2 + d^2 = p be a prime, A002313(n). Then x^2 + y^2 = q is the smallest prime, a(n), such that cx + dy = 1 (Bézout's identity), where c,d,x,y are integers. We have pq = m^2 + 1 at m = cy - dx. %C A244290 a(n) is the smallest prime q such that q*A002313(n)-1 is a square. - _Thomas Ordowski_, Sep 13 2015 %C A244290 Conjecture: a(n) < A002313(n)^2 for n > 1. - _Thomas Ordowski_, Dec 28 2017 %H A244290 Robert Israel, <a href="/A244290/b244290.txt">Table of n, a(n) for n = 1..2910</a> %e A244290 For prime 2 = 1^2 + 1^2 is 1*2 + 1*(-1) = 1 and 2^2 + (-1)^2 = 5 is prime, so a(1) = 5. For A002313(2) = 5 is vice versa so a(2) = 2. %p A244290 N:= 10^6: # to get all a(n) before the first one > N %p A244290 P:= select(isprime, [2,seq(4*i+1, i=1..floor((N-1)/4))]): %p A244290 f:= proc(p) local i; %p A244290 for i from 1 to nops(P) do %p A244290 if issqr(p*P[i]-1) then return P[i] fi %p A244290 od: %p A244290 -1 %p A244290 end proc: %p A244290 for i from 1 to nops(P) do %p A244290 v:= f(P[i]); %p A244290 if v = -1 then break fi; %p A244290 A[i]:= v; %p A244290 od: %p A244290 seq(A[j],j=1..i-1); # _Robert Israel_, Sep 13 2015 %o A244290 (PARI) %o A244290 \\ cs should contain terms from A002330 %o A244290 \\ ds should contain terms from A002331 %o A244290 a244290(cs, ds) = { %o A244290 vector(#cs, i, %o A244290 c=cs[i]; d=ds[i]; [u,v]=gcdext(c, d); %o A244290 x=u; y=v; while(!isprime(x^2+y^2), x+=d; y-=c); e=x^2+y^2; %o A244290 x=u; y=v; while(!isprime(x^2+y^2), x-=d; y+=c); f=x^2+y^2; %o A244290 min(e, f) %o A244290 ) %o A244290 } \\ _Colin Barker_, Jul 06 2014 %Y A244290 Cf. A002313, A002330, A002331. %K A244290 nonn %O A244290 1,1 %A A244290 _Thomas Ordowski_, Jun 27 2014 %E A244290 More terms from _Colin Barker_, Jul 06 2014