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 A300845 #27 Mar 18 2018 09:46:25 %S A300845 3,2,7,2,3,2,3,11,3,3,3,2,7,3,19,7,7,2,11,13,2,5,37,19,11,3,5,3,5,13, %T A300845 3,7,7,2,7,5,2,3,37,7,3,29,13,5,3,11,17,29,37,2,13,3,2,67,19,7,7,5,3, %U A300845 3,29,43,23,7,5,3,3,5,7,2,43,3,2,17,17,7,19,2,13,23,43,3,7,2,2,7,7,2,7 %N A300845 a(n) is the smallest prime q such that q^2 + q*p + p^2 is a prime number where p is n-th prime, or 0 if no such q exists. %C A300845 Probably, for each prime p, there is prime q such that q^2 + q*p + p^2 is also a prime since the existence of such q is a special case of Hypothesis H of Schinzel and Sierpinski. However, this is not proven yet. %C A300845 Corresponding generalized cuban primes are 19, 19, 109, 67, 163, 199, 349, 691, 607, 937, 1063, 1447, 2017, 1987, 3463, 3229, 3943, 3847, 5347, 6133, ... %H A300845 Wikipedia, <a href="https://en.wikipedia.org/wiki/Schinzel%27s_hypothesis_H">Schinzel's Hypothesis H</a> %e A300845 a(3) = 7 because 7^2 + 7*5 + 5^2 = 109 is prime number and 7 is the least prime with this property. %p A300845 f:= proc(p) local q; %p A300845 q:= 1; %p A300845 do %p A300845 q:= nextprime(q); %p A300845 if isprime(q^2+q*p+p^2) then return q fi; %p A300845 od %p A300845 end proc: %p A300845 map(f, select(isprime, [2,seq(i,i=3..1000,2)])); # _Robert Israel_, Mar 13 2018 %t A300845 Table[Block[{q = 2}, While[! PrimeQ[q^2 + q p + p^2], q = NextPrime@ q]; q], {p, Prime@ Range@ 89}] (* _Michael De Vlieger_, Mar 14 2018 *) %o A300845 (PARI) a(n) = {my(p=prime(n)); forprime(q=2, ,if(isprime(p^2+p*q+q^2), return(q)))} %Y A300845 Cf. A007645, A244146, A244175. %K A300845 nonn %O A300845 1,1 %A A300845 _Altug Alkan_, Mar 13 2018