This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A317636 #16 Aug 19 2018 15:47:37 %S A317636 1,0,2,0,0,0,2,0,8,0,14,0,15,0,0,0,9,0,5,0,2,0,16,0,0,0,26,0,4,0,25,0, %T A317636 14,0,0,0,21,0,15,0,40,0,67,0,0,0,78,0,54,0,9,0,66,0,0,0,5,0,25,0,111, %U A317636 0,44,0,0,0,161,0,18,0,49,0,30,0,0,0,73,0,15,0,27,0,27,0,0,0,41,0,20,0,54,0,47,0,0,0,63,0,18,0,98,0,102,0,0,0,3,0,99,0,21 %N A317636 Minimum number of consecutive positive integers starting with 1 that must be concatenated in descending order so that n divides the concatenation, or zero if n divides no such concatenation. %C A317636 a(n) = 0 if n is even or a multiple of 5. Empirical observation: a(n) > 0 for all other n values. %e A317636 For n=19 the a(19)=5 since 54321 = 19*2859, while 4321, 321, 21 and 1 are not multiples of 19. %t A317636 Table[If[GCD[n, 10] == 1, Block[{k = 1}, While[Mod[FromDigits@ Flatten@ Map[IntegerDigits, Range[k, 1, -1]], n] != 0, k++]; k],0], {n, 111}] (* _Michael De Vlieger_, Aug 02 2018 *) %o A317636 (Pascal) %o A317636 program skaitlirinda2; %o A317636 var i : longint; %o A317636 function Atrodi(n : longint) : int64; %o A317636 var sk, koefa, naksk, rez : int64; %o A317636 begin %o A317636 sk := 1; %o A317636 naksk := 10; %o A317636 koefa := naksk mod n; %o A317636 rez := sk mod n; %o A317636 while rez>0 do %o A317636 begin %o A317636 Inc(sk); %o A317636 rez := (sk * koefa + rez) mod n; %o A317636 if sk=naksk then naksk := naksk * 10; %o A317636 koefa := (koefa*naksk) mod n; %o A317636 end; %o A317636 Atrodi := sk; %o A317636 end; %o A317636 begin %o A317636 for i:=1 to 10000 do %o A317636 begin %o A317636 if (i mod 2)*(i mod 5) > 0 then writeln(i,' ',Atrodi(i)) else writeln(i,' 0'); %o A317636 end; %o A317636 end. %o A317636 (PARI) a(n) = {if ((n%2) && (n%5), my(s = ""); for (k=1, oo, s = concat(Str(k), s); if (!(eval(s) % n), return (k)););); return (0);} \\ _Michel Marcus_, Aug 02 2018 %Y A317636 Cf. A088886, A075002. %K A317636 nonn,base %O A317636 1,3 %A A317636 _Martins Opmanis_, Aug 02 2018