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.

A078218 Smallest multiple of n that begins with the concatenation of the divisors of n (in increasing order).

This page as a plain text file.
%I A078218 #11 Oct 08 2024 07:10:12
%S A078218 1,12,132,124,15,1236,175,1248,1395,12510,1111,12346128,1131,127148,
%T A078218 13515,124816,1173,12369186,1197,12451020,137214,12112210,12305,
%U A078218 1234681224,1525,1213264,1392714,1247142820,12905,12356101530,13113
%N A078218 Smallest multiple of n that begins with the concatenation of the divisors of n (in increasing order).
%H A078218 Robert Israel, <a href="/A078218/b078218.txt">Table of n, a(n) for n = 1..10000</a>
%e A078218 The concatenation of the divisors of 7 is 17; 175 = 25*7 is the smallest multiple of 7 that begins with 17, so a(7) = 175.
%p A078218 cdiv:= proc(n) local D,R,j;
%p A078218   D:= sort(convert(numtheory:-divisors(n),list));
%p A078218   R:= D[1];
%p A078218   for j from 2 to nops(D) do
%p A078218     R:= R * 10^(1+ilog10(D[j])) + D[j];
%p A078218   od;
%p A078218   R
%p A078218 end proc:
%p A078218 f:= proc(n) local t,i,r;
%p A078218   t:= cdiv(n);
%p A078218   for i from 0 do
%p A078218     r:= n * ceil(t*10^i/n);
%p A078218     if r < (t+1)*10^i then return r fi
%p A078218   od
%p A078218 end proc:
%p A078218 map(f, [$1..50]); # _Robert Israel_, Oct 07 2024
%o A078218 (PARI) {for(n=1,31,k=floor(log(n)/log(10))+1; d=divisors(n); v=Str(); for(i=1,matsize(d)[2], v=concat(v,Str(d[i]))); s=eval(v); t=s+1; m=floor(log(s)/log(10))+1; d=k-m; s=s*10^d; t=t*10^d; b=1; while(b>0,q=floor(s/n); while(b>0&&(p=q*n)<t,if(p>=s,print1(p,","); b=0,q++)); s=10*s; t=10*t))}
%Y A078218 Cf. A037278, A069872, A078810.
%K A078218 base,nonn,look
%O A078218 1,2
%A A078218 _Amarnath Murthy_, Nov 22 2002
%E A078218 Edited and extended by _Klaus Brockhaus_, Dec 06 2002