login
A350540
a(n) = smallest number x such that x^2 == 17 (mod 2^n).
1
0, 1, 1, 1, 1, 7, 9, 23, 23, 23, 233, 279, 279, 1769, 1769, 6423, 9961, 9961, 55575, 55575, 206569, 206569, 842007, 1255145, 2939159, 2939159, 2939159, 2939159, 64169705, 64169705, 204265751, 204265751, 869476073, 869476073, 3425491223, 3425491223, 13754377961
OFFSET
0,6
COMMENTS
17 is the smallest nonsquare that is congruent to a square mod 2^n for any n.
Any number that is congruent to a square mod 2^n for any n is of the form (4^a)*(8b+1). Such numbers have density 1/6.
MATHEMATICA
Table[PowerMod[17, 1/2, 2^k], {k, 0, 36}] (* Giorgos Kalogeropoulos, Jan 31 2023 *)
PROG
(PARI) a(n) = my(x=0); while (Mod(x, 2^n)^2 != 17, x++); x; \\ Michel Marcus, Jan 04 2022
(Python)
from sympy.ntheory import sqrt_mod
def A350540(n): return min(sqrt_mod(17, 2**n, all_roots=True)) # Chai Wah Wu, Jan 12 2022
CROSSREFS
Sequence in context: A070423 A018882 A257332 * A179788 A319878 A083582
KEYWORD
nonn
AUTHOR
Tejo Vrush, Jan 04 2022
EXTENSIONS
a(13)-a(28) from Michel Marcus, Jan 04 2022
a(30)-a(36) from Alois P. Heinz, Jan 04 2022
Edited by N. J. A. Sloane, Jan 12 2022
STATUS
approved