The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 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. 0
 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, 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, 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 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS a(n) = 0 if n is even or a multiple of 5. Empirical observation: a(n) > 0 for all other n values. LINKS EXAMPLE For n=19 the a(19)=5 since 54321 = 19*2859, while 4321, 321, 21 and 1 are not multiples of 19. MATHEMATICA 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 *) PROG (Pascal)   program skaitlirinda2; var i : longint; function Atrodi(n : longint) : int64; var sk, koefa, naksk, rez : int64; begin    sk := 1;    naksk := 10;    koefa := naksk mod n;    rez := sk mod n;    while rez>0 do     begin      Inc(sk);      rez := (sk * koefa + rez) mod n;      if sk=naksk then naksk := naksk * 10;      koefa := (koefa*naksk) mod n;     end;    Atrodi := sk; end; begin   for i:=1 to 10000 do    begin     if (i mod 2)*(i mod 5) > 0 then writeln(i, ' ', Atrodi(i)) else writeln(i, ' 0');    end; end. (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 CROSSREFS Cf. A088886, A075002. Sequence in context: A318879 A333783 A088886 * A305566 A326813 A137347 Adjacent sequences:  A317633 A317634 A317635 * A317637 A317638 A317639 KEYWORD nonn,base AUTHOR Martins Opmanis, Aug 02 2018 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 9 23:26 EDT 2020. Contains 336335 sequences. (Running on oeis4.)