A381527 a(n) is the smallest positive multiple of n such that the decimal expansion of a(n)/n is a substring of the decimal expansion of a(n), or -1 if no such number exists.
-1, 1, -1, 15, -1, 25, 12, 35, -1, 45, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, -1, 21, 198, 115, 1728, 125, 52, 135, 168, 145, 150, 31, 2912, 165, 1428, 140, 72, 148, 1368, 195, -1, 41, 3948, 215, 132, 135, 92, 235, 384, 245, 250, 51, 1248, 265, 378, 275
Offset: 0
Examples
44*1 = 44 does not have 1 as a substring. 44*2 = 88 does not have 2 as a substring. 44*3 = 132 has 3 as a substring. So, a(44) = 132.
Links
- Dominic McCarty, Table of n, a(n) for n = 0..10000
Crossrefs
Cf. A381526 (for a(n)/n).
Programs
-
Python
from itertools import count def a(n): if n in [0, 2, 4, 8]: return -1 if n % 10 == 0: return -1 if (k:=a(n//10)) == -1 else 10*k for k in count(1): if str(k) in str(k*n): return k*n print([a(n) for n in range(100)])