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.

A244779 Positive numbers primitively represented by the binary quadratic form (1, 1, 2).

This page as a plain text file.
%I A244779 #13 Oct 31 2016 10:22:10
%S A244779 1,2,4,7,8,11,14,16,22,23,28,29,32,37,43,44,46,53,56,58,64,67,71,74,
%T A244779 77,79,86,88,92,106,107,109,112,113,116,121,127,128,134,137,142,148,
%U A244779 149,151,154,158,161,163,172,176,179,184,191,193,197,203,211,212,214
%N A244779 Positive numbers primitively represented by the binary quadratic form (1, 1, 2).
%C A244779 Discriminant = -7.
%H A244779 Robert Israel, <a href="/A244779/b244779.txt">Table of n, a(n) for n = 1..10000</a>
%H A244779 N. J. A. Sloane et al., <a href="https://oeis.org/wiki/Binary_Quadratic_Forms_and_OEIS">Binary Quadratic Forms and OEIS</a> (Index to related sequences, programs, references)
%p A244779 PriRepBQF := proc(a, b, c, n) local L,q,R,r,k;
%p A244779 q := a*x^2 + b*x*y + c*y^2; L := NULL;
%p A244779 for k from 1 to n do
%p A244779    R := [isolve(q = k)];
%p A244779    if R = [] then next fi;
%p A244779    for r in R do
%p A244779       igcd(op(2,r[1]), op(2,r[2]));
%p A244779       if 1 = % then L := L,k; break fi od
%p A244779 od; L end:
%p A244779 A244779_list := n -> PriRepBQF(1, 1, 2, n); A244779_list(214);
%p A244779 # Alternate program
%p A244779 A244779_set:= proc(N) local A, B, y,x;
%p A244779    A:= {};
%p A244779    for y from 0 to floor(sqrt(4*N/7)) do
%p A244779      for x from ceil(-y/2) to floor(-y/2 + sqrt(N - 7/4*y^2)) do
%p A244779        if igcd(x,y) = 1 then
%p A244779          A:= A union {x^2 + x*y + 2*y^2}
%p A244779        fi
%p A244779      od
%p A244779     od;
%p A244779 A
%p A244779 end proc:
%p A244779 A244779_set(1000); # _Robert Israel_, Jul 06 2014
%t A244779 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 *)
%Y A244779 Cf. A244780, A244819.
%K A244779 nonn
%O A244779 1,2
%A A244779 _Peter Luschny_, Jul 06 2014