A306257 a(n) = t for the minimal integer k > t such that k^2 mod n = t^2 is a perfect square.
0, 0, 1, 0, 2, 2, 2, 1, 0, 3, 3, 2, 3, 3, 1, 0, 4, 0, 4, 4, 2, 4, 4, 1, 0, 5, 3, 5, 5, 2, 5, 2, 4, 5, 1, 0, 6, 6, 5, 3, 6, 4, 6, 6, 2, 6, 6, 1, 0, 0, 7, 7, 7, 6, 3, 5, 5, 7, 7, 2, 7, 7, 1, 0, 4, 8, 8, 8, 7, 2, 8, 3, 8, 8, 5, 8, 2, 7, 8, 1, 0, 9, 9, 4, 6, 9, 7, 9, 9, 4, 3, 9, 8, 9, 7, 2, 9, 0, 1, 0, 10, 8, 10, 9, 4
Offset: 1
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..20000
Programs
-
Maple
a:= proc(n) local k; for k from (s-> `if`(s^2