login
a(n) = minimal positive k such that the concatenation of decimal digits n and n+1 is a divisor of the concatenation of n+2, n+2+1, ..., n+2+k.
4

%I #28 Mar 01 2020 01:33:05

%S 3,4,3,24,13,7,33,7,749,125,1019,3643,123,1319,1199,1424,1481,664,659,

%T 734,6139,933,607,549,165,8124,63,296,1339,13817,1691,6979,3,704,2187,

%U 156,987,2521,1459,1277,6047,25565,3179,1954,7127,1115,6139,18749,1149

%N a(n) = minimal positive k such that the concatenation of decimal digits n and n+1 is a divisor of the concatenation of n+2, n+2+1, ..., n+2+k.

%C Like A332580 a heuristic argument, based on the divergent sum of reciprocals which approximates the probability that the concatenation of n and n+1 will divide the concatenation of n+2, n+3, ..., suggests that k should always exist.

%H Scott R. Shannon, <a href="/A332830/b332830.txt">Table of n, a(n) for n = 1..10000</a>

%e a(1) = 3 as '1'||'2' = 12 and '3'||'4'||'5'||'6' = 3456, which is divisible by 12 (where '||' denotes decimal concatenation).

%e a(4) = 24 as '4'||'5' = 45 and '6'||'7'||....||'29'||'30' = 6789101112131415161718192021222324252627282930, which is divisible by 45.

%p a:= proc(n) local i, t, m; t, m:= parse(cat(n,n+1)), 0;

%p for i from n+2 do m:= parse(cat(m,i)) mod t;

%p if m=0 then break fi od; i-n-2

%p end:

%p seq(a(n), n=1..50); # _Alois P. Heinz_, Feb 29 2020

%o (PARI) a(n) = {my(k=1, small=eval(concat(Str(n), Str(n+1))), big=n+2); while( big % small, big = eval(concat(Str(big), Str(n+2+k))); k++); k--;} \\ _Michel Marcus_, Feb 29 2020

%Y Cf. A332580, A332867, A007908.

%K nonn,base

%O 1,1

%A _Scott R. Shannon_, Feb 25 2020