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.
%I A178158 #32 Oct 22 2018 10:33:23 %S A178158 1,2,3,4,5,6,7,8,9,11,12,15,21,22,24,25,31,32,33,35,36,41,42,44,45,48, %T A178158 51,52,55,61,62,63,64,65,66,71,72,75,77,81,82,84,85,88,91,92,93,95,96, %U A178158 99,101,102,104,105,125,201,202,204,205,208,225,301,302,303,304,305,306,312,315,325,375,401,402,404,405,408,425,501,502,504,505,525,601,602,603,604 %N A178158 Numbers n that are divisible by every suffix of n. %C A178158 If n = y*10^d+z is in the sequence, where 1<=y<=9 and z < 10^d, then z | y*10^d. - _Robert Israel_, Oct 17 2018 %H A178158 Robert Israel, <a href="/A178158/b178158.txt">Table of n, a(n) for n = 1..10000</a> (first 788 terms from Reinhard Zumkeller) %H A178158 Math Overflow, <a href="https://mathoverflow.net/questions/313079/the-number-of-numbers-no-greater-than-n-that-are-divisible-by-all-their-suffixes">The number of numbers no greater than n that are divisible by all their suffixes</a> %e A178158 9375 is in the sequence because : %e A178158 . 5 | 9375 ; %e A178158 . 75 | 9375 ; %e A178158 . 375 | 9375 ; %e A178158 . 9375 | 9375 . %p A178158 with(numtheory):T:=array(1..5):for n from 1 to 10000 do:ind:=0:l:=length(n):n0:=n:s:=0:for m from 0 to l-1 do:q:=n0:u:=irem(q, 10):v:=iquo(q, 10):n0:=v : s:=s + u*10 ^m:if irem(n,10)<>0 and irem(n, s)=0 then ind:=ind+1:else fi:od:if ind=l then printf(`%d,`, n):else fi:od: %p A178158 # Alternative: %p A178158 filter:= proc(x) %p A178158 if x mod 10 = 0 then return false fi; %p A178158 andmap(t -> type(x/(x mod 10^t),integer), [$1..ilog10(x)]) %p A178158 end proc: %p A178158 Res:= $1..9: %p A178158 for d from 1 to 6 do %p A178158 for y from 1 to 9 do %p A178158 for z in sort(convert(select(`<`,numtheory:-divisors(y*10^d),10^d),list)) do %p A178158 if filter(y*10^d+z) then %p A178158 Res:= Res, y*10^d+z; %p A178158 fi %p A178158 od od od: %p A178158 Res; # _Robert Israel_, Oct 17 2018 %o A178158 (Haskell) %o A178158 import Data.List (tails) %o A178158 a178158 n = a178158_list !! (n-1) %o A178158 a178158_list = filter (\suff -> all ((== 0) . (mod suff)) %o A178158 (map read $ tail $ init $ tails $ show suff :: [Integer])) a067251_list %o A178158 -- _Reinhard Zumkeller_, Mar 26 2012 %Y A178158 Cf. A034709 . %Y A178158 Cf. A067251. %K A178158 nonn,base %O A178158 1,2 %A A178158 _Michel Lagneau_, Dec 17 2010