login
A075018
Smallest k such that the concatenation k, k-1,k-2,k-3 is divisible by n; or 0 if no such number exists.
0
3, 3, 3, 5, 3, 3, 5, 5, 6, 3, 18, 9, 11, 5, 3, 15, 13, 15, 19, 23, 18, 29, 29, 15, 28, 11, 33, 5, 4, 3, 40, 15, 18, 13, 18, 15, 28, 19, 24, 23, 26, 39, 7, 51, 33, 29, 55, 15, 53, 53, 30, 63, 54, 33, 18, 5, 57, 41, 56, 63, 69, 71, 60, 15, 63
OFFSET
1,1
EXAMPLE
a(7) = 5 as 7 divides 5432.
MATHEMATICA
Transpose[Flatten[Table[Select[Reverse[Partition[Range[100, 0, -1], 4, 1]], Divisible[FromDigits[ Flatten[IntegerDigits/@#]], n]&, 1], {n, 70}], 1]] [[1]] (* Harvey P. Dale, Nov 22 2011 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Sep 01 2002
EXTENSIONS
Corrected and extended by Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 19 2003
STATUS
approved