login
A057757
Least nonnegative square root of 2 mod n for n in A057126.
2
0, 0, 3, 4, 6, 5, 8, 6, 17, 18, 7, 10, 8, 12, 32, 9, 24, 25, 40, 14, 10, 38, 51, 11, 16, 31, 12, 32, 46, 70, 18, 13, 64, 57, 52, 14, 20, 38, 39, 15, 62, 85, 74, 99, 22, 16, 60, 110, 96, 106, 132, 17, 45
OFFSET
1,3
MATHEMATICA
A057126 = Prepend[ Select[ Range[300], Reduce[ Mod[2 - k^2, #] == 0, k, Integers] =!= False &], 1]; a[n_] := Min[ r /. {ToRules[ Reduce[ Mod[r^2 - 2, A057126[[n]]] == 0, r, Integers] /. C[1] -> 0]}]; a[1] = 0; Table[a[n], {n, 1, 53}] (* Jean-François Alcover, Sep 20 2012 *)
CROSSREFS
Cf. A057126.
Sequence in context: A083342 A372784 A016655 * A336717 A332361 A360655
KEYWORD
nonn,easy,nice
AUTHOR
N. J. A. Sloane, Nov 01 2000
EXTENSIONS
Corrected by T. D. Noe, Apr 19 2007 [The errors were caused by the faulty Maple command "mroot"]
STATUS
approved