login
Smallest k such that the concatenation k, k-1 is divisible by n; or 0 if no such number exists.
1

%I #6 Mar 04 2023 18:10:44

%S 1,1,2,3,1,5,2,3,5,1,17,17,6,9,11,3,16,5,7,21,2,17,18,29,26,17,5,33,8,

%T 11,35,3,17,33,26,41,11,7,17,21,13,47,4,17,41,41,27,29,9,51,50,17,21,

%U 5,61,61,35,27,52,41,29,35,68,45,6

%N Smallest k such that the concatenation k, k-1 is divisible by n; or 0 if no such number exists.

%H Harvey P. Dale, <a href="/A075014/b075014.txt">Table of n, a(n) for n = 1..1000</a>

%e a(14) = 9 as 14 divides 98.

%t skc[n_]:=Module[{k=1},While[Mod[FromDigits[Flatten[IntegerDigits/@{k,k-1}]],n] != 0,k++];k]; Array[skc,70] (* _Harvey P. Dale_, Mar 04 2023 *)

%Y Cf. A075114, A075115, A075116, A075117.

%K base,nonn

%O 1,3

%A _Amarnath Murthy_, Sep 01 2002

%E Corrected and extended by Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 19 2003