cp's OEIS Frontend

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.

A352803 a(n) is the first prime p such that, with q the next prime, p^2+q is 10^n times a prime.

This page as a plain text file.
%I A352803 #37 Dec 29 2022 09:16:48
%S A352803 2,523,2243,39419,763031,37427413,594527413,5440486343,1619625353,
%T A352803 35960850223,17012632873031,43502632873031,2322601810486343,
%U A352803 5470654702304929,99466287423954043,1917321601810486343,6091565756519625353
%N A352803 a(n) is the first prime p such that, with q the next prime, p^2+q is 10^n times a prime.
%C A352803 From _Daniel Suteu_, Dec 28 2022: (Start)
%C A352803 For n >= 1, a(n) has the form k * 10^n + x, for some k >= 0, where x is a solution to the modular quadratic equation x^2 + x + d == 0 (mod 10^n), where d = q-p.
%C A352803 a(17) <= 379430283012423635659, a(18) <= 1857717470295105527413. (End)
%e A352803 a(2) = 2243 because 2243 is prime, the next prime is 2251, 2243^2+2251 = 5033300 = 10^2*50333 and 50333 is prime.
%p A352803 V:= Array(0..5):
%p A352803 count:= 0:
%p A352803 q:= 2:
%p A352803 while count < 6 do
%p A352803   p:= q; q:= nextprime(p);
%p A352803   v:= p^2+q;
%p A352803   r:= padic:-ordp(v, 2);
%p A352803   if r <= 5 and V[r] = 0 and padic:-ordp(v, 5) = r and isprime(v/10^r) then
%p A352803      V[r]:= p; count:= count+1;
%p A352803   fi;
%p A352803 od:
%p A352803 convert(V, list);
%o A352803 (PARI)
%o A352803 isok(n,p,q) = my(v=valuation(p^2+q, 10)); (v == n) && isprime((p^2+q)/10^v);
%o A352803 a(n) = my(p=2); forprime(q=p+1, oo, if(isok(n,p,q), return(p)); p=q); \\ _Daniel Suteu_, Apr 07 2022
%Y A352803 Cf. A002386, A352848, A352852.
%K A352803 nonn,more
%O A352803 0,1
%A A352803 _J. M. Bergot_ and _Robert Israel_, Apr 05 2022
%E A352803 a(6)-a(9) from _Daniel Suteu_, Apr 07 2022
%E A352803 a(10)-a(16) from _Daniel Suteu_, Dec 28 2022