A346904 Numbers with sum of digits equaling 17, divisible by 17, and containing the string "17".
13175, 15317, 17153, 17306, 17612, 21743, 30617, 41174, 51731, 61217, 101762, 107117, 110177, 111707, 117062, 117215, 117521, 122417, 125171, 131750, 153017, 153170, 170153, 170306, 170612, 171071, 171224, 171530, 172142, 172601, 173060, 173213, 174131, 175202, 176120, 214217
Offset: 1
Examples
13175 contains 17 as a substring; the sum of digits of 13175 is 17, and 13175 is divisible by 17. Thus, 13175 is in this sequence.
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..14300 (all terms < 10^11)
Programs
-
Mathematica
d17Q[n_] := Module[{idn = IntegerDigits[n]}, Total[idn] == 17 && MemberQ[Partition[idn, 2, 1], {1, 7}]]; Select[17*Range[20000], d17Q]
-
Python
def ok(n): s = str(n); return n%17==0 and '17' in s and sum(map(int, s))==17 print(list(filter(ok, range(214218)))) # Michael S. Branicky, Aug 06 2021