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.

A084702 a(n) is the smallest k such that k + 1 and n*k + 1 both are perfect squares, or 0 if no such number exists.

Original entry on oeis.org

3, 24, 8, 0, 3, 8, 24, 3, 0, 8, 48, 24, 15, 120, 8, 3, 15, 168, 80, 48, 3, 24, 360, 15, 0, 24, 440, 8, 120, 80, 120, 195, 3, 840, 24, 8, 35, 960, 440, 3, 168, 120, 168, 28560, 8, 48, 1680, 35, 0, 48, 24, 120, 483, 175560, 8, 3, 24, 528, 212520, 728, 63, 3024
Offset: 1

Views

Author

Amarnath Murthy, Jun 08 2003

Keywords

Comments

a(4) = 0 as when k+1 is a square, 4k+4 is also a square; hence 4k+1 cannot be a square for k > 0.

Examples

			a(5) = 3 as 3 + 1 = 4 and 3*5 + 1 = 16 both are squares.
		

Crossrefs

Cf. A084703.

Programs

  • Mathematica
    r[n_, c_] := Reduce[i>1 && j>1 && k+1 == i^2 && n*k+1 == j^2, {i,j,k}, Integers] /. C[1] -> c // Simplify;
    a[n_] := If[rn = r[n,0] || r[n,1] || r[n,2]; rn === False, 0, k /. Solve[rn] // Min];
    Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 1, 100}] (* Jean-François Alcover, May 12 2017 *)

Formula

a(i^2-1) is usually (i-1)^2-1. For 2 < i < 1000 there are 34 exceptions. The first four of these are a(11^2-1) = 3, a(23^2-1) = 8, a(39^2-1) = 15 and a(41^2-1) = 3. - David Wasserman, May 03 2007

Extensions

More terms from Donald Sampson (marsquo(AT)hotmail.com), Dec 04 2003
Corrected by David Wasserman, May 03 2007