login
A395368
a(n) is the least multiple of n that starts with y and ends with x, where n is the concatenation of x and y, or -1 if there is no such multiple.
1
11, -1, 351, -1, -1, -1, 731, -1, 931, -1, 1092, 22, 322, 432, -1, 6032, 702, 812, 9222, -1, 1023, -1, 33, -1, -1, -1, 703, -1, 9243, -1, 164, 294, 344, 44, -1, 644, 7144, 864, 9114, -1, 1275, -1, 3445, -1, 55, -1, 7125, -1, 9145, -1, 1586, 2046, 3276, 4096, -1, 66, 7236, 816, 966, -1, 1207, -1
OFFSET
11,1
COMMENTS
Leading zeros are not allowed.
a(n) = -1 if n is even and only its last digit is even, or if n is divisible by 5 and only its last digit is divisible by 5.
LINKS
EXAMPLE
a(124) = 4712 because 4712 = 38 * 124 starts with 4, ends with 12, and is the smallest number that works.
MAPLE
f:= proc(n) local x, da, db, a, b, K, m, k, r, v;
r:= infinity;
for db from 1 to ilog10(n) do
b:= n mod 10^db; a:= (n-b)/10^db;
da:= ilog10(a)+1;
if b < 10^(db-1) then next fi;
K:= map(t -> rhs(op(t)), [msolve(x*n=a, 10^da)]);
for k in K do
for m from k by 10^da do
v:= m*n;
if v >= r then break fi;
if floor(v/10^(ilog10(v)+1-db)) = b then r:= v; break fi;
od od;
od;
if r = infinity then -1 else r fi
end proc:
map(f, [$11 .. 1000]);
CROSSREFS
Sequence in context: A132098 A223513 A160480 * A045998 A287194 A283083
KEYWORD
sign,base,look
AUTHOR
Robert Israel, Apr 20 2026
STATUS
approved