login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A218794 Numbers that can be written as p^2 + 3pq + q^2 with primes p < q. 1
31, 59, 79, 95, 121, 179, 191, 229, 251, 295, 311, 389, 395, 401, 451, 479, 491, 541, 569, 671, 695, 719, 745, 809, 899, 971, 1019, 1061, 1109, 1111, 1121, 1151, 1249, 1271, 1301, 1409, 1451, 1499, 1595, 1619, 1661, 1711, 1919, 1931, 1949, 1991, 2059, 2105, 2111, 2141, 2195, 2201, 2245 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
This is a subsequence of A218793, with the restriction that p < q, excluding terms of the form 5p^2 unless they would have another decomposition of the given form.
Sequence A218771 is the subsequence of primes in this sequence.
LINKS
EXAMPLE
a(1) = 31 = p^2+3pq+q^2 for p=2, q=3.
a(20) = 671 = p^2+3pq+q^2 for (p,q)=(2,23) and (5,19) is the least term to allow more than 1 decomposition. See A218795 for more such terms.
MATHEMATICA
With[{nn=60}, Take[Union[#[[1]]^2+3Times@@#+#[[2]]^2&/@Subsets[Prime[ Range[ Floor[nn/3]]], {2}]], nn]] (* Harvey P. Dale, Apr 08 2013 *)
PROG
(PARI) is_A218794(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-1)\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}
CROSSREFS
Sequence in context: A193362 A293345 A096453 * A218771 A109356 A061251
KEYWORD
nonn
AUTHOR
M. F. Hasler, Nov 05 2012
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 6 16:55 EDT 2024. Contains 372297 sequences. (Running on oeis4.)