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.

A054986 Base-10 modest numbers.

This page as a plain text file.
%I A054986 #25 Mar 28 2022 11:24:56
%S A054986 13,19,23,26,29,39,46,49,59,69,79,89,103,109,111,133,199,203,206,209,
%T A054986 211,218,222,233,266,299,309,311,327,333,399,406,409,411,412,418,422,
%U A054986 433,436,444,466,499,509,511,515,533,545,555,599,609,611,618,622,627
%N A054986 Base-10 modest numbers.
%C A054986 A number is modest if there exists at least one partitioning of its decimal expansion wherein the number divided by the second part leaves a remainder of the first part.
%D A054986 Problem 1291, J. Rec. Math., 17 (No.2, 1984), 140-141.
%H A054986 Reinhard Zumkeller, <a href="/A054986/b054986.txt">Table of n, a(n) for n = 1..10000</a>
%e A054986 2036 is modest because 2036 mod 36 = 20. 2037 is modest because 2037 mod 037 = 2.
%o A054986 (Haskell)
%o A054986 import Data.List (inits, tails)
%o A054986 a054986 n = a054986_list !! (n-1)
%o A054986 a054986_list = filter modest [1..] where
%o A054986    modest x = or $ zipWith m
%o A054986               (map read $ (init $ tail $ inits $ show x) :: [Integer])
%o A054986               (map read $ (tail $ init $ tails $ show x) :: [Integer])
%o A054986       where m u v = u < v && (x - u) `mod` v == 0
%o A054986 -- _Reinhard Zumkeller_, Mar 26 2012
%o A054986 (PARI) is(n,p=1)=while(n>p*=10,n%p&&(n%(n%p)==n\p)&&return(1)) \\ _M. F. Hasler_, Sep 17 2014
%o A054986 (Python)
%o A054986 def ok(n):
%o A054986     s = str(n)
%o A054986     for i in range(1, len(s)):
%o A054986         head, tail = int(s[:i]), int(s[i:])
%o A054986         if tail and n%tail == head: return True
%o A054986     return False
%o A054986 print([k for k in range(628) if ok(k)]) # _Michael S. Branicky_, Mar 28 2022
%Y A054986 Cf. A007627.
%K A054986 easy,nonn,base
%O A054986 1,1
%A A054986 _Hans Havermann_, May 30 2000