A173639 Numbers n such that the sum of the digits of 11*n is odd.
19, 28, 29, 37, 38, 39, 46, 47, 48, 49, 55, 56, 57, 58, 59, 64, 65, 66, 67, 68, 69, 73, 74, 75, 76, 77, 78, 79, 82, 83, 84, 85, 86, 87, 88, 89, 119, 128, 129, 137, 138, 139, 146, 147, 148, 149
Offset: 1
Examples
19 is on the list because 11*19 = 209 and 2+0+9 is odd.
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Programs
-
Haskell
a173639 n = a173639_list !! (n-1) a173639_list = filter (odd . a007953 . (* 11)) [0..] -- Reinhard Zumkeller, Jul 05 2014
-
Maple
L := []; for n to 150 do if `mod`(add(i, i = convert(11*n, base, 10)), 2) = 1 then L := [op(L), n] end if end do; L;
-
Mathematica
Select[Range[200],OddQ[Total[IntegerDigits[11#]]]&] (* Harvey P. Dale, May 28 2012 *)
-
Python
ans = [] for n in range(1,151): N,s = 11*n,0 while N: s += N % 10 N //= 10 if s % 2: ans.append(n) print(ans)
Comments