login
A061276
Numbers that are sums of repdigits of their digits (see Comments for precise definition).
2
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 197, 198, 199, 285, 373, 461, 554, 1098, 1099, 1185, 1186, 1187, 1276, 1278, 1365, 1366, 1453, 1454, 1458, 1459, 1543, 2176, 2261, 2263, 2354, 2357, 2359, 2532, 2621, 2623, 2996, 2997, 2999, 3254, 3259, 3340, 3341, 3342, 3343
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.
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
Cf. A131366.
Sequence in context: A328279 A039723 A002998 * A249515 A217555 A137667
KEYWORD
base,easy,nice,nonn
AUTHOR
Erich Friedman, Jun 02 2001
EXTENSIONS
Edited by N. J. A. Sloane, Mar 19 2023
STATUS
approved