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.
%I A031363 #120 Dec 23 2024 10:42:51 %S A031363 1,4,5,9,11,16,19,20,25,29,31,36,41,44,45,49,55,59,61,64,71,76,79,80, %T A031363 81,89,95,99,100,101,109,116,121,124,125,131,139,144,145,149,151,155, %U A031363 164,169,171,176,179,180,181,191,196,199,205,209,211,220,225,229,236 %N A031363 Positive numbers of the form x^2 + xy - y^2; or, of the form 5x^2 - y^2. %C A031363 5x^2 - y^2 has discriminant 20, x^2 + xy - y^2 has discriminant 5. - _N. J. A. Sloane_, May 30 2014 %C A031363 Representable as x^2 + 3xy + y^2 with 0 <= x <= y. - _Benoit Cloitre_, Nov 16 2003 %C A031363 Numbers k such that x^2 - 3xy + y^2 + k = 0 has integer solutions. - _Colin Barker_, Feb 04 2014 %C A031363 Numbers k such that x^2 - 7xy + y^2 + 9k = 0 has integer solutions. - _Colin Barker_, Feb 10 2014 %C A031363 Also positive numbers of the form x^2 - 5y^2. - _Jon E. Schoenfield_, Jun 03 2022 %D A031363 M. Baake, "Solution of coincidence problem ...", in R. V. Moody, ed., Math. of Long-Range Aperiodic Order, Kluwer 1997, pp. 9-44. %H A031363 Robert Israel and Vincenzo Librandi, <a href="/A031363/b031363.txt">Table of n, a(n) for n = 1..10000</a> %H A031363 M. Baake, <a href="http://arxiv.org/abs/math/0605222">Solution of the coincidence problem in dimensions d <= 4</a>, arxiv:math/0605222 [math.MG], 2006. %H A031363 M. Baake and R. V. Moody, <a href="http://www.math.uni-bielefeld.de/baake/ps/fields3.ps.gz">Similarity submodules and semigroups</a> in Quasicrystals and Discrete Geometry, ed. J. Patera, Fields Institute Monographs, vol. 10 AMS, Providence, RI (1998) pp. 1-13. %H A031363 J. H. Conway, E. M. Rains and N. J. A. Sloane, On the existence of similar sublattices, Canad. J. Math. 51 (1999), 1300-1306 (<a href="http://neilsloane.com/doc/sim.txt">Abstract</a>, <a href="http://neilsloane.com/doc/sim.pdf">pdf</a>, <a href="http://neilsloane.com/doc/sim.ps">ps</a>). %H A031363 Norbert Hungerbühler and Maciej Smela, <a href="https://hal.science/hal-04835410v1">Geometric approach to the Diophantine equation x^2 + x*y - y^2 = m</a>, hal-04835410, 2024. See p. 18. %H A031363 N. J. A. Sloane, <a href="http://neilsloane.com/doc/sg.txt">My favorite integer sequences</a>, in Sequences and their Applications (Proceedings of SETA '98). %H A031363 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) %F A031363 Consists exactly of numbers in which primes == 2 or 3 mod 5 occur with even exponents. %F A031363 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 = 5. %p A031363 select(t -> nops([isolve(5*x^2-y^2=t)])>0, [$1..1000]); # _Robert Israel_, Jun 12 2014 %t A031363 ok[n_] := Resolve[Exists[{x, y}, Element[x|y, Integers], n == 5*x^2-y^2]]; Select[Range[236], ok] %t A031363 (* or, for a large number of terms: *) %t A031363 max = 60755 (* max=60755 yields 10000 terms *); A031363 = {}; xm = 1; %t A031363 While[T = A031363; A031363 = Table[5*x^2 - y^2, {x, 1, xm}, {y, 0, Floor[ x*Sqrt[5]]}] // Flatten // Union // Select[#, # <= max&]&; A031363 != T, xm = 2*xm]; A031363 (* _Jean-François Alcover_, Mar 21 2011, updated Mar 17 2018 *) %o A031363 (PARI) select(x -> x, direuler(p=2,101,1/(1-(kronecker(5,p)*(X-X^2))-X)), 1) \\ Fixed by _Andrey Zabolotskiy_, Jul 30 2020, after hints by _Colin Barker_, Jun 18 2014, and _Michel Marcus_ %o A031363 (PARI) is(n)=#bnfisintnorm(bnfinit(z^2-z-1),n) \\ _Ralf Stephan_, Oct 18 2013 %o A031363 (PARI) %o A031363 seq(M,k=3) = { \\ assume k >= 0 %o A031363 setintersect([1..M], setbinop((x,y)->x^2 + k*x*y + y^2, [0..1+sqrtint(M)])); %o A031363 }; %o A031363 seq(236) \\ _Gheorghe Coserea_, Jul 29 2018 %o A031363 (Python) %o A031363 from itertools import count, islice %o A031363 from sympy import factorint %o A031363 def A031363_gen(): # generator of terms %o A031363 return filter(lambda n:all(not((1 < p % 5 < 4) and e & 1) for p, e in factorint(n).items()),count(1)) %o A031363 A031363_list = list(islice(A031363_gen(),30)) # _Chai Wah Wu_, Jun 28 2022 %Y A031363 Numbers representable as x^2 + k*x*y + y^2 with 0 <= x <= y, for k=0..9: A001481(k=0), A003136(k=1), A000290(k=2), this sequence, A084916(k=4), A243172(k=5), A242663(k=6), A243174(k=7), A243188(k=8), A316621(k=9). %Y A031363 See A035187 for number of representations. %Y A031363 Primes in this sequence: A038872, also A141158. %Y A031363 For a list of sequences giving numbers and/or primes represented by binary quadratic forms, see the "Binary Quadratic Forms and OEIS" link. %Y A031363 See also the related sequence A263849 based on a theorem of Maass. %K A031363 nonn,easy,nice %O A031363 1,2 %A A031363 _N. J. A. Sloane_ %E A031363 More terms from _Erich Friedman_ %E A031363 b-file corrected and extended by _Robert Israel_, Jun 12 2014