

A108297


Least positive k such that k * n^2 ends with n, or 0 no such k exists.


0



1, 1, 3, 7, 4, 1, 1, 3, 2, 9, 0, 91, 23, 77, 0, 0, 11, 53, 0, 79, 0, 81, 0, 87, 24, 1, 0, 63, 17, 69, 0, 71, 18, 97, 0, 0, 16, 73, 0, 59, 0, 61, 0, 7, 4, 0, 0, 83, 12, 49, 0, 51, 13, 17, 0, 0, 21, 93, 0, 39, 0, 41, 0, 27, 9, 0, 0, 3, 7, 29, 0, 31, 8, 37, 0, 3, 1, 13, 0, 19, 0, 21, 0, 47, 14, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,3


LINKS

Table of n, a(n) for n=0..85.


EXAMPLE

a(3) = 7 because 7 * 3^2 = 63, which ends with "3".
a(11) = 91 because 91 * 11^2 = 11011 which ends with "11".
a(22) = 0 because there is no "k" such that k*22^2 ends with 22.


MATHEMATICA

f[n_] := Block[{k = 1, n2 = n^2, m = Max[10^Floor[ Log[10, n] + 1], 10]}, While[k < 10^4 && Mod[k*n2, m] != n, k++ ]; If[k == 10^4, 0, k]]; Table[ f[n], {n, 85}] (* Robert G. Wilson v, Jul 02 2005 *)


CROSSREFS

Sequence in context: A110778 A200129 A181912 * A135928 A011444 A272004
Adjacent sequences: A108294 A108295 A108296 * A108298 A108299 A108300


KEYWORD

nonn,base


AUTHOR

Luca Colucci, Jun 29 2005


EXTENSIONS

Edited and extended by Robert G. Wilson v, Jul 02 2005


STATUS

approved



