login
Positive integers of the form x^2+3xy-y^2.
2

%I #32 Jun 27 2023 23:11:52

%S 1,3,4,9,12,13,16,17,23,25,27,29,36,39,43,48,49,51,52,53,61,64,68,69,

%T 75,79,81,87,92,100,101,103,107,108,113,116,117,121,127,129,131,139,

%U 144,147,153,156,157,159,169,172,173,179,181,183,191,192,196,199,204,207,208,211,212,221,225,233,237,243,244,251

%N Positive integers of the form x^2+3xy-y^2.

%C This is an indefinite quadratic form of discriminant 13.

%C Also, positive integers of the form x^2+6xy-4y^2 (an indefinite quadratic form of discriminant 52).

%C Also, indices of the nonzero terms in expansion of Dirichlet series Product_p (1-(Kronecker(m,p)+1)*p^(-s)+Kronecker(m,p)*p^(-2s))^(-1) for m= 13.

%C From _Klaus Purath_, May 07 2023: (Start)

%C Also, positive integers of the form x^2 + (2m+1)xy + (m^2+m-3)y^2, m, x, y integers. This includes the form in the name.

%C Also, positive integers of the form x^2 + 2mxy + (m^2-13)y^2, m, x, y integers. This includes the form in the comment above.

%C This sequence contains all squares. The prime factors of the terms except for {2, 5, 7, 11, 19, ...} = A038884 are terms of the sequence. Also the products of terms belong to the sequence. Thus this set of terms is closed under multiplication.

%C A positive integer N belongs to the sequence if and only if N (modulo 13) is a term of A010376 and, moreover, in the case that prime factors p of N are terms of A038884, they occur only with even exponents. For these prime factors also p (modulo 13) = {2, 5, 6, 7, 8, 11} applies. (End)

%H 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)

%t formQ[n_] := Reduce[a > 0 && b > 0 && n == a^2 + 3 a*b - b^2, {a, b}, Integers] =!= False; Select[Range[100], formQ] (* _Wesley Ivan Hurt_, Jun 18 2014 *)

%o (PARI) m=13; select(x -> x, direuler(p=2,101,1/(1-(kronecker(m,p)*(X-X^2))-X)), 1) \\ Fixed by _Andrey Zabolotskiy_, Jul 30 2020

%Y Primes in this sequence = A038883 and A141188.

%Y Cf. A035195.

%K nonn

%O 1,2

%A _N. J. A. Sloane_

%E Entry revised by _N. J. A. Sloane_, Jun 01 2014