[go: up one dir, main page]

login
A242660
Nonnegative numbers of the form x^2+xy-2y^2.
6
0, 1, 4, 7, 9, 10, 13, 16, 18, 19, 22, 25, 27, 28, 31, 34, 36, 37, 40, 43, 45, 46, 49, 52, 54, 55, 58, 61, 63, 64, 67, 70, 72, 73, 76, 79, 81, 82, 85, 88, 90, 91, 94, 97, 99, 100, 103, 106, 108, 109, 112, 115, 117, 118, 121, 124, 126, 127, 130, 133, 135, 136, 139, 142, 144, 145, 148, 151, 153, 154, 157, 160, 162, 163, 166, 169, 171, 172, 175, 178, 180, 181
OFFSET
1,3
COMMENTS
Discriminant 9.
Are the positive entries the same as A056991? - R. J. Mathar, Jun 10 2014
We have x^2+xy-2y^2 = (x+2y)(x-y) which can be written as z(3x-2z) by letting z=x-y. All (x,z) pairs in the square 0<=x,z<=8 have values z(3x-2z) == {0,1,4,7} (mod 9), which shows that all positive terms of this sequence have digital roots that define A056991: this sequence is a subsequence of A056991 (with 0 as a special case). - R. J. Mathar, Jun 12 2014
LINKS
N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
FORMULA
From Colin Barker, Oct 31 2016: (Start)
a(n) = a(n-1)+a(n-4)-a(n-5) for n>5.
G.f.: x^2*(1+2*x)*(1+x+x^2) / ((1-x)^2*(1+x)*(1+x^2)). (End)
E.g.f.: (8 + 3*cos(x) + (9*x - 11)*cosh(x) + sin(x) + (9*x - 10)*sinh(x))/4. - Stefano Spezia, Aug 05 2024
MAPLE
# Maple Program fb, for indefinite binary quadratic forms
# f = ax^2+bxy+cy^2 with discriminant d = b^2-4ac = s^2 a perfect square.
# Looks for numbers 0 <= n <= M represented and also primes represented.
fb:=proc(a, b, c, M) local s, t1, t2, n, d, dp;
if not issqr(b^2-4*a*c) then error "disct not a square"; return; fi;
s:=sqrt(b^2-4*a*c); t1:={0}; t2:={};
for n from 1 to M do
for d in numtheory[divisors](4*a*n) do dp:=4*a*n/d;
if ((d-dp) mod 2*s) = 0 and (((b+s)*dp-(b-s)*d) mod 4*a*s) = 0
then t1:={op(t1), n}; if isprime(n) then t2:={op(t2), n}; fi; break; fi;
od:
od:
[sort(convert(t1, list)), sort(convert(t2, list))];
end;
fb(1, 1, -2, 500);
MATHEMATICA
Select[Range[0, 1000], MatchQ[Mod[#, 9], Alternatives[0, 1, 4, 7]]&] (* Jean-François Alcover, Oct 31 2016 *)
PROG
(PARI) concat(0, Vec(x^2*(1+2*x)*(1+x+x^2)/((1-x)^2*(1+x)*(1+x^2)) + O(x^100))) \\ Colin Barker, Oct 31 2016
CROSSREFS
Primes in this sequence = A002476.
Sequence in context: A010380 A358348 A056991 * A010389 A010415 A010442
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 31 2014, Jun 03 2014
STATUS
approved