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.

A384538 Positive integers k >= 10 for which for every pair of nonempty substrings that concatenate to give k one substring divides the other.

This page as a plain text file.
%I A384538 #25 Jun 25 2025 19:44:50
%S A384538 10,11,12,13,14,15,16,17,18,19,20,21,22,24,26,28,30,31,33,36,39,40,41,
%T A384538 42,44,48,50,51,55,60,61,62,63,66,70,71,77,80,81,82,84,88,90,91,93,99,
%U A384538 100,101,102,105,110,111,120,121,122,123,124,126,130,131,140,141
%N A384538 Positive integers k >= 10 for which for every pair of nonempty substrings that concatenate to give k one substring divides the other.
%H A384538 Felix Huber, <a href="/A384538/b384538.txt">Table of n, a(n) for n = 1..2000</a>
%e A384538 324 is a term because 3 divides 24 and 4 divides 32.
%e A384538 105 is a term because 1 divides 05 = 5 and 5 divides 10.
%e A384538 2500 is a term because 2 divides 500. 25 divides 00 = 0 and 250 divides 0.
%e A384538 104 is not a term: Although 1 divides 04 = 4, 4 does not divide 10.
%p A384538 A384538:=proc(n)
%p A384538     option remember;
%p A384538     local i,j,k,p,m,q,L;
%p A384538     if n=1 then
%p A384538         10
%p A384538     else
%p A384538         for k from procname(n-1)+1 do
%p A384538             L:=ListTools:-Reverse(convert(k,'base',10));
%p A384538             m:=length(k)-1;
%p A384538             for j to m do
%p A384538                 p:=parse(cat(seq(L[i],i=1..j)));
%p A384538                 q:=k-p*10^(m+1-length(p));
%p A384538                 if q mod p<>0 and p mod q<>0 then
%p A384538                     break
%p A384538             	 elif j=m then
%p A384538                     return k
%p A384538                 fi
%p A384538             od
%p A384538         od
%p A384538     fi;
%p A384538 end proc;	
%p A384538 seq(A384538(n),n=1..62);
%o A384538 (Python)
%o A384538 def c(k, m): return (k > 0 and m%k == 0) or (m > 0 and k%m == 0)
%o A384538 def ok(n):
%o A384538     s = str(n)
%o A384538     return n > 9 and all(c(int(s[:i]), int(s[i:])) for i in range(1, len(s)))
%o A384538 print([k for k in range(150) if ok(k)]) # _Michael S. Branicky_, Jun 17 2025
%o A384538 (PARI) isok(k) = my(nb=logint(k, 10), d=10); for (i=1, nb, my(sa = k%d, sb=k\d); if ((sa % sb) && (sb % sa), return(0)); d *= 10;); return(1); \\ _Michel Marcus_, Jun 19 2025
%Y A384538 Supersequence of A384539.
%Y A384538 Cf. A102766, A228103.
%K A384538 nonn,base
%O A384538 1,1
%A A384538 _Felix Huber_, Jun 09 2025