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.

Original entry on oeis.org

12, 19, 27, 39, 49, 67, 75, 79, 109, 147, 163, 199, 201, 217, 247, 259, 309, 327, 349, 363, 399, 403, 427, 433, 457, 481, 507, 543, 579, 597, 607, 669, 679, 691, 739, 777, 867, 903, 937, 973, 997, 1011, 1027, 1063, 1083, 1093, 1141, 1209, 1227, 1281, 1327, 1387, 1423, 1447, 1489, 1533, 1579, 1587
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Jan 09 2022

Keywords

Comments

The only square in this sequence is 49.

Examples

			a(3) = 27 is a term because 27 = 3^2+3*3+3^2.
a(4) = 39 is a term because 39 = 2^2+2*5+5^2.
		

Crossrefs

Contains A079705, A244146, A349987.
Subsequence of A024614.

Programs

  • Maple
    N:= 10^4: # for terms <= N
    P:= select(isprime, [2,seq(i,i=3..floor(sqrt(N)),2)]):
    nP:= nops(P):
    S:= {}:
    for i from 1 to nP do
      for j from 1 to i do
        x:= P[i]^2 + P[i]*P[j]+P[j]^2;
        if x > N then break fi;
        S:= S union {x};
    od od:
    sort(convert(S,list));