The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A244779 Positive numbers primitively represented by the binary quadratic form (1, 1, 2). 3
1, 2, 4, 7, 8, 11, 14, 16, 22, 23, 28, 29, 32, 37, 43, 44, 46, 53, 56, 58, 64, 67, 71, 74, 77, 79, 86, 88, 92, 106, 107, 109, 112, 113, 116, 121, 127, 128, 134, 137, 142, 148, 149, 151, 154, 158, 161, 163, 172, 176, 179, 184, 191, 193, 197, 203, 211, 212, 214 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Discriminant = -7.
LINKS
N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
MAPLE
PriRepBQF := proc(a, b, c, n) local L, q, R, r, k;
q := a*x^2 + b*x*y + c*y^2; L := NULL;
for k from 1 to n do
R := [isolve(q = k)];
if R = [] then next fi;
for r in R do
igcd(op(2, r[1]), op(2, r[2]));
if 1 = % then L := L, k; break fi od
od; L end:
A244779_list := n -> PriRepBQF(1, 1, 2, n); A244779_list(214);
# Alternate program
A244779_set:= proc(N) local A, B, y, x;
A:= {};
for y from 0 to floor(sqrt(4*N/7)) do
for x from ceil(-y/2) to floor(-y/2 + sqrt(N - 7/4*y^2)) do
if igcd(x, y) = 1 then
A:= A union {x^2 + x*y + 2*y^2}
fi
od
od;
A
end proc:
A244779_set(1000); # Robert Israel, Jul 06 2014
MATHEMATICA
Reap[For[n = 1, n < 1000, n++, r = Reduce[x^2 + x y + 2 y^2 == n, {x, y}, Integers]; If[r =!= False, If[AnyTrue[{x, y} /. {ToRules[r /. C[1] -> 0]}, CoprimeQ @@ # &], Sow[n]]]]][[2, 1]] (* Jean-François Alcover, Oct 31 2016 *)
CROSSREFS
Sequence in context: A080704 A316094 A290259 * A162158 A018552 A030773
KEYWORD
nonn
AUTHOR
Peter Luschny, Jul 06 2014
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 23 07:08 EDT 2024. Contains 372760 sequences. (Running on oeis4.)