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.

A349986 Numbers that can be represented as p^2 + p*q + q^2 where p and q are primes.

This page as a plain text file.
%I A349986 #34 Jan 10 2022 15:37:05
%S A349986 12,19,27,39,49,67,75,79,109,147,163,199,201,217,247,259,309,327,349,
%T A349986 363,399,403,427,433,457,481,507,543,579,597,607,669,679,691,739,777,
%U A349986 867,903,937,973,997,1011,1027,1063,1083,1093,1141,1209,1227,1281,1327,1387,1423,1447,1489,1533,1579,1587
%N A349986 Numbers that can be represented as p^2 + p*q + q^2 where p and q are primes.
%C A349986 The only square in this sequence is 49.
%H A349986 Robert Israel, <a href="/A349986/b349986.txt">Table of n, a(n) for n = 1..10000</a>
%H A349986 Mathematics StackExchange, <a href="https://math.stackexchange.com/questions/450012/largest-square-written-as-p2pqq2-where-p-q-are-primes">Largest square written as p^2+pq+q^2 where p, q are primes?</a>
%e A349986 a(3) = 27 is a term because 27 = 3^2+3*3+3^2.
%e A349986 a(4) = 39 is a term because 39 = 2^2+2*5+5^2.
%p A349986 N:= 10^4: # for terms <= N
%p A349986 P:= select(isprime, [2,seq(i,i=3..floor(sqrt(N)),2)]):
%p A349986 nP:= nops(P):
%p A349986 S:= {}:
%p A349986 for i from 1 to nP do
%p A349986   for j from 1 to i do
%p A349986     x:= P[i]^2 + P[i]*P[j]+P[j]^2;
%p A349986     if x > N then break fi;
%p A349986     S:= S union {x};
%p A349986 od od:
%p A349986 sort(convert(S,list));
%Y A349986 Contains A079705, A244146, A349987.
%Y A349986 Subsequence of A024614.
%K A349986 nonn
%O A349986 1,1
%A A349986 _J. M. Bergot_ and _Robert Israel_, Jan 09 2022