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.

A245226 Values of n such that the equation x^2 - n*y^2 = n has integer solutions.

Original entry on oeis.org

1, 2, 4, 5, 8, 9, 10, 13, 16, 17, 18, 20, 25, 26, 29, 32, 36, 37, 40, 41, 45, 49, 50, 52, 53, 58, 61, 64, 65, 68, 72, 73, 74, 80, 81, 82, 85, 89, 90, 97, 98, 100, 101, 104, 106, 109, 113, 116, 117, 121, 122, 125, 128, 130, 137, 144, 145, 148, 149, 153, 157
Offset: 1

Views

Author

Colin Barker, Jul 14 2014

Keywords

Comments

All the squares are in this sequence.
Differs from A001481 \ {0} and A248151 from a(17) = 36 on. The number 0 is in the sequence according to its definition. - M. F. Hasler, Oct 22 2019

Examples

			5 is in the sequence because x^2-5*y^2=5 has integer solutions, including (x,y) = (5,2) and (85,38).
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1,200],Solve[x^2==#*(1+y^2),{x,y},Integers]!={}&] (* Vaclav Kotesovec, Jul 15 2014 *)
  • PARI
    isok(m) = if (issquare(4*m), 1, #qfbsolve(Qfb(1, 0, -m), m, 2)); \\ Michel Marcus, May 17 2025