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.

A115879 a(n) is the least positive x satisfying the Diophantine equation x^2=y(y+n). a(n)=0 if there are no solutions.

Original entry on oeis.org

0, 0, 2, 0, 6, 4, 12, 3, 6, 12, 30, 8, 42, 24, 4, 6, 72, 12, 90, 24, 10, 60, 132, 5, 30, 84, 18, 48, 210, 8, 240, 12, 22, 144, 6, 24, 342, 180, 26, 15, 420, 20, 462, 120, 12, 264, 552, 7, 84, 60, 34, 168, 702, 36, 24, 21, 38, 420, 870, 16, 930, 480, 8, 24, 36, 44
Offset: 1

Views

Author

Giovanni Resta, Feb 02 2006

Keywords

Examples

			a(15)=4 since the solutions (x,y) to x^2=y(y+15) are (4,1), (10,5), (18, 12) and (56, 49). The least x values is 4, from (x,y)=(4,1).
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local q;
      q:= max(select(t -> t^2 < n^2 and n^2/t - t mod 4 = 0, numtheory:-divisors(n^2)));
      if q = -infinity then 0 else (n^2/q - q)/4 fi;
    end proc:
    map(f, [$1..100]); # Robert Israel, Aug 21 2025
  • Python
    from itertools import takewhile
    from collections import deque
    from sympy import divisors
    def A115879(n): return -(a:=next(iter(deque((d for d in takewhile(lambda d:d>2 # Chai Wah Wu, Aug 21 2024