A119461 Zero-free numbers with digit sum equal to 7.
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
Crossrefs
Subsequence of A052221.
Programs
-
Mathematica
Union[Flatten[Table[FromDigits/@Select[Tuples[Range[7],n],Total[#]==7&],{n,7}]]] (* Harvey P. Dale, Aug 29 2015 *)
-
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
Comments