

A187719


Smallest number that when squared is congruent to 41 mod 10^n.


2



1, 21, 71, 1179, 2429, 47571, 1296179, 8703821, 26452429, 526452429, 13241296179, 19473547571, 2263241296179, 2480526452429, 67263241296179, 932736758703821, 4067263241296179, 38602480526452429, 461397519473547571
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

41 is the smallest number that is not a perfect square for which a sequence like this is welldefined. For 24, the sequence is 2,18,32 and then terminates because no square ends in 0024.
41 is the first term of A188173, which lists other numbers with this property.  T. D. Noe, Mar 23 2011


LINKS



EXAMPLE

71 qualifies because 71^2 is 5041 which ends in 041.


MATHEMATICA

Table[Solve[x^2 == 41 && Modulus == 10^n, x, Mode > Modular][[1, 2, 2]], {n, 21}] (* T. D. Noe, Mar 22 2011 *)


PROG

(Sage)
bposs = [0]
works = lambda x, j: (x^2) % (10^j) == 41 % (10^j)
for w in [0..n]:
bposs = list((i*10**w+b) for i, b in cartesian_product([[0..9], bposs]))
bposs = list(b for b in bposs if works(b, w))
final = list(b for b in bposs if works(b, n))


CROSSREFS



KEYWORD

nonn,easy


AUTHOR



STATUS

approved



