[go: up one dir, main page]

login
A066333
a(n) = min(x : x^2 + n^2 = 0 mod (x+n-1)).
2
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,2
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, ...
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 *)
PROG
(PARI) a(n) = {my(k=1); while((k^2+n^2)%(k+n-1) != 0, k++); k; } \\ Altug Alkan, Feb 17 2018
CROSSREFS
Sequence in context: A113249 A087171 A282026 * A230870 A115642 A115643
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Jan 01 2002
EXTENSIONS
a(28) corrected by Altug Alkan, Feb 17 2018
STATUS
approved