cp's OEIS Frontend

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.

A292885 a(n) is the least number k such that k | concat(k-n,k-n+1,…,k,…,k+n-1,k+n).

This page as a plain text file.
%I A292885 #15 Oct 06 2017 04:34:08
%S A292885 1,3,3,9,6,9,9,9,9,27,15,33,18,27,18,21,18,27,27,27,24,27,27,27,27,27,
%T A292885 27,143,34,143,45,63,36,39,39,45,42,143,89,57,45,43,143,99,54,135,154,
%U A292885 63,63,63,75,63,154,189,66,165,72,171,153,189,90,63,81,69,69
%N A292885 a(n) is the least number k such that k | concat(k-n,k-n+1,…,k,…,k+n-1,k+n).
%H A292885 Paolo P. Lava, <a href="/A292885/b292885.txt">Table of n, a(n) for n = 0..500</a>
%e A292885 a(4) = 6 because concat(2, 3, 4, 5, 6, 7, 8, 9, 10) = 2345678910 is a multiple of 6 and 6 is the least number to have this property.
%p A292885 P:=proc(q) local a,j,k,n; for k from 1 by 2 to q do for n from 1 to q do a:=n;
%p A292885 for j from 1 to k-1 do a:=a*10^(ilog10(n+j)+1)+n+j; od;
%p A292885 if type(a/(n+(k-1)/2),integer) then print(n+(k-1)/2); break; fi; od; od; end: P(10^9);
%t A292885 Table[SelectFirst[Range[10^3], Function[k, If[And[FreeQ[#, _?(# < 0 &)], First@ # != 0], Divisible[FromDigits@ Flatten@ Map[IntegerDigits, #], k]] &[k + Range[-n, n]] ] ], {n, 0, 64}] (* _Michael De Vlieger_, Sep 27 2017 *)
%o A292885 (PARI) isok(k, n) = {my(s = ""); for (i=0, 2*n, s = concat(s, k-n+i);); (eval(s) % k) == 0;}
%o A292885 a(n) = {my(k = n+1); while(!isok(k,n), k++); k;} \\ _Michel Marcus_, Oct 06 2017
%Y A292885 Cf. A069860, A069862, A069871, A088797, A088798, A088877.
%K A292885 nonn,base,easy
%O A292885 0,2
%A A292885 _Paolo P. Lava_, Sep 26 2017