OFFSET
1,3
COMMENTS
If d is 1, 2, 3, ..., or 9, let S(d) denote a decimal number of the form ddd...d, with at least one d, and let S(0) = 0.
The sequence consists of numbers k with the following property. If the decimal expansion of k is ijk..., then k can also be written as S(i)+S(j)+S(k)+...
For example, 199 is a term, because 99 = 1 + 99 + 99, which has the form S(1)+S(9)+S(9).
For further examples see the Seidov link.
LINKS
T. D. Noe, Table of n, a(n) for n = 1..7474 (numbers < 1000000)
EXAMPLE
1185 = 1111 + 11 + 8 + 55.
MATHEMATICA
okQ[n_] := Module[{d, len, ones, lst}, d = IntegerDigits[n]; len = Length[d]; ones = Table[(10^i - 1)/9, {i, len}]; lst = d[[1]]*ones; Do[lst = Union[Flatten[Outer[Plus, lst, d[[i]]*ones]]], {i, 2, len}]; MemberQ[lst, n]]; Select[Range[0, 4000], okQ] (* T. D. Noe, Dec 09 2011 *)
CROSSREFS
KEYWORD
base,easy,nice,nonn
AUTHOR
Erich Friedman, Jun 02 2001
EXTENSIONS
Edited by N. J. A. Sloane, Mar 19 2023
STATUS
approved