OFFSET
1,3
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
MATHEMATICA
sdssQ[n_]:=Module[{idn=IntegerDigits[n], s, len}, s=Total[idn]; len= IntegerLength[ s]; MemberQ[Partition[idn, len, 1], IntegerDigits[s]]]; Join[{0}, Select[Range[1100], sdssQ]] (* Harvey P. Dale, Jan 02 2013 *)
PROG
(Haskell)
import Data.List (isInfixOf)
a052018 n = a052018_list !! (n-1)
a052018_list = filter f [0..] where
f x = show (a007953 x) `isInfixOf` show x
-- Reinhard Zumkeller, Jun 18 2013
(Python)
loop = (str(n) for n in range(399))
print([int(n) for n in loop if str(sum(int(k) for k in n)) in n]) # Jonathan Frech, Jun 05 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, Nov 15 1999
STATUS
approved