OFFSET
1,1
COMMENTS
For any prime number p, a(p) is the least of the concatenation of p with 1 or the concatenation of 1 with p.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
EXAMPLE
The first terms, alongside an appropriate way to split them into two factors, are:
n a(n) a(n)
-- ---- ----
1 11 1*1
2 12 1*2
3 13 1*3
4 14 1*4
5 15 1*5
6 16 1*6
7 17 1*7
8 18 1*8
9 19 1*9
10 25 2*5
11 111 11*1
12 26 2*6
13 113 1*13
14 27 2*7
15 35 3*5
MATHEMATICA
Table[Min@ Map[FromDigits[Join @@ #] &, Join @@ {#, Reverse /@ #}] &@ Map[IntegerDigits[#] &, Transpose@{#, n/#}, {2}] &@ TakeWhile[Divisors[n], # <= Sqrt[n] &], {n, 60}] (* Michael De Vlieger, Apr 07 2023 *)
PROG
(PARI) a(n, base = 10) = { my (v = oo); fordiv (n, d, v = min(v, n/d * base^#digits(d, base) + d); ); return (v); }
(Python)
from sympy import divisors
def a(n): return min(int(str(d)+str(n//d)) for d in divisors(n))
print([a(n) for n in range(1, 61)]) # Michael S. Branicky, Apr 05 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Apr 05 2023
STATUS
approved