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 A218793 #9 Mar 31 2015 15:43:22 %S A218793 20,31,45,59,79,95,121,125,179,191,229,245,251,295,311,389,395,401, %T A218793 451,479,491,541,569,605,671,695,719,745,809,845,899,971,1019,1061, %U A218793 1109,1111,1121,1151,1249,1271,1301,1409,1445,1451,1499,1595,1619,1661,1711 %N A218793 Numbers that can be written as p^2 + 3pq + q^2 with prime p and q. %C A218793 Sequence A218771 is the subsequence of primes in this sequence. %H A218793 M. F. Hasler, <a href="/A218793/b218793.txt">Table of n, a(n) for n = 1..7196</a> (all terms below 10^6). %e A218793 a(1) = 20 = p^2+3pq+q^2 for p=q=2, in the same way all numbers of the form 5p^2 are member of the sequence. %e A218793 a(2) = 31 = p^2+3pq+q^2 for p=2, q=3. %e A218793 a(25) = 671 = p^2+3pq+q^2 for (p,q)=(2,23) and (5,19), is the least term to allow more than 1 decomposition. %e A218793 a(1431) = 136895 = p^2+3pq+q^2 for (p,q)=(2,367), (67,277) and (103,233), is the least term to allow more than 2 decompositions. %t A218793 nf[{a_,b_}]:=a^2+3a*b+b^2; Take[Union[nf/@Tuples[Prime[Range[20]],2]],50] (* _Harvey P. Dale_, Mar 31 2015 *) %o A218793 (PARI) is_A218793(n, v=0)={ /* set v=1 to count number of decompositions, and v=2 to print them */ my(r, c=0); forprime( q=1, sqrtint(n\5), issquare(4*n+5*q^2, &r) || next; isprime((r-3*q)/2) || next; v || return(1); v>1 & print1([q, (r-3*q)/2]", "); c++); c} %K A218793 nonn %O A218793 1,1 %A A218793 _M. F. Hasler_, Nov 05 2012