login
A119461
Zero-free numbers with digit sum equal to 7.
2
7, 16, 25, 34, 43, 52, 61, 115, 124, 133, 142, 151, 214, 223, 232, 241, 313, 322, 331, 412, 421, 511, 1114, 1123, 1132, 1141, 1213, 1222, 1231, 1312, 1321, 1411, 2113, 2122, 2131, 2212, 2221, 2311, 3112, 3121, 3211, 4111, 11113, 11122, 11131, 11212, 11221, 11311, 12112, 12121, 12211, 13111, 21112, 21121, 21211, 22111, 31111, 111112, 111121, 111211, 112111, 121111, 211111, 1111111
OFFSET
1,1
COMMENTS
There are exactly 64 such numbers while numbers with digit sum equal to 7 (A052221) are infinite.
MATHEMATICA
Union[Flatten[Table[FromDigits/@Select[Tuples[Range[7], n], Total[#]==7&], {n, 7}]]] (* Harvey P. Dale, Aug 29 2015 *)
PROG
(Python)
def ok(n): s = str(n); return '0' not in s and sum(map(int, s)) == 7
print(list(filter(ok, range(1111112)))) # Michael S. Branicky, Jul 16 2021
CROSSREFS
Subsequence of A052221.
Sequence in context: A217009 A017245 A052221 * A326664 A028560 A190530
KEYWORD
base,fini,full,nonn
AUTHOR
Zak Seidov, May 20 2006
STATUS
approved