login
A392964
a(n) is the least nonnegative integer such that for all positive integers k, appending zero or more copies of a(n) to k will eventually result in a value divisible by n.
0
0, 0, 1, 0, 0, 2, 100000, 0, 1, 0, 10, 4, 100000, 100000, 5, 0, 1000000000000000, 2, 100000000000000000, 0, 100000, 10, 1000000000000000000000, 8, 0, 100000, 100, 100000, 1000000000000000000000000000, 10, 100000000000000, 0, 10, 1000000000000000, 100000, 4, 100, 100000000000000000, 100000, 0
OFFSET
1,6
COMMENTS
The length of a(n) must be a multiple of A051626(d) (or 1, where A051626(d) is zero) for any d dividing n.
LINKS
Hugo van der Sanden, Perl program (GitHub).
EXAMPLE
a(5)=0 because if we append zero to any positive integer the result will be a multiple of 5.
a(6)=2 because if we append 2 up to three times to any positive integer the result will be a multiple of 6.
a(7)=100000 since A051626(7)=6: for any value less than this there are some k that never give a multiple of 7. For example, appending 1 fails for k=3 since 3, 31, 311, ... are all equivalent to 3 (mod 7). However since 10^6 k + 100000 == k + 5 (mod 7), appending 100000 means that every k will cycle through possible values (mod 7) until reaching a number that is divisible by 7.
CROSSREFS
Cf. A051626.
Sequence in context: A060069 A354177 A231612 * A296104 A170995 A319022
KEYWORD
nonn,base
AUTHOR
Ali Sada and Hugo van der Sanden, Jan 28 2026
STATUS
approved