A384539 Zeroless positive integers k for which for every pair of nonempty substrings that concatenate to give k one substring divides the other.
11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 24, 26, 28, 31, 33, 36, 39, 41, 42, 44, 48, 51, 55, 61, 62, 63, 66, 71, 77, 81, 82, 84, 88, 91, 93, 99, 111, 121, 122, 123, 124, 126, 131, 141, 142, 147, 151, 153, 155, 161, 162, 164, 168, 171, 181, 182, 183, 186, 189
Offset: 1
Examples
168 is a term because 1 divides 68 and 8 divides 16. 4284 is a term because 4 divides 284, 42 divides 84 and 4 divides 428. 222222 is a term because 2 divides 22222, 22 divides 2222, 222 divides 222 and vice versa.
Links
- Felix Huber, Table of n, a(n) for n = 1..132
- David A. Corneth, PARI program
Programs
-
Maple
A384539:=proc(n) option remember; local i,j,k,p,m,q,L; if n=1 then 11 else for k from procname(n-1)+1 do L:=ListTools:-Reverse(convert(k,'base',10)); if not member(0,L) then m:=length(k)-1; for j to m do p:=parse(cat(seq(L[i],i=1..j))); q:=k-p*10^(m+1-length(p)); if max(p,q) mod min(p,q)<>0 then break elif j=m then return k fi od fi od fi; end proc; seq(A384539(n),n=1..60);
-
Python
def c(k, m): return m%k == 0 or k%m == 0 def ok(n): s = str(n) return n > 9 and "0" not in s and all(c(int(s[:i]), int(s[i:])) for i in range(1, len(s))) print([k for k in range(200) if ok(k)]) # Michael S. Branicky, Jun 18 2025
Comments