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.

A066333 a(n) = min(x : x^2 + n^2 = 0 mod (x+n-1)).

Original entry on oeis.org

1, 4, 11, 2, 37, 56, 11, 106, 21, 172, 3, 42, 301, 60, 407, 22, 93, 596, 119, 742, 9, 4, 991, 42, 1177, 1276, 255, 62, 37, 1712, 1831, 366, 2081, 416, 2347, 2486, 5, 60, 555, 3082, 153, 12, 3571, 714, 189, 56, 127, 4466, 893, 120, 5051, 1010, 97, 176, 403, 6, 1221, 332, 127, 14, 7261, 24, 539, 1550, 93
Offset: 1

Views

Author

Benoit Cloitre, Jan 01 2002

Keywords

Programs

  • Mathematica
    a[n_] := For[x = 1, True, x++, If[Mod[x^2+n^2, x+n-1] == 0, Return[x]]]; Array[a, 40] (* Jean-François Alcover, Feb 17 2018 *)
  • PARI
    a(n) = {my(k=1); while((k^2+n^2)%(k+n-1) != 0, k++); k;} \\ Altug Alkan, Feb 17 2018

Formula

a(n) = 2*n^2 - 3*n+2 for n=1, 2, 3, 5, 6, 8, 10, 13, 15, 18, 20, 23, 25, 26, 30, 31, 33, 35, 36, 40, 43, ...

Extensions

a(28) corrected by Altug Alkan, Feb 17 2018