A138103 Numbers with an odd number of 1's in base 6 expansion.
1, 6, 8, 9, 10, 11, 13, 19, 25, 31, 36, 38, 39, 40, 41, 43, 48, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 68, 69, 70, 71, 73, 78, 80, 81, 82, 83, 85, 91, 97, 103, 109, 114, 116, 117, 118, 119, 121, 127, 133, 139, 145, 150, 152, 153, 154, 155, 157, 163
Offset: 1
Examples
a(1) = 1 because 1 base 10 = 1 base 6, which has an odd number (1) of ones. a(2) = 6 because 6 base 10 = 10 base 6, which has an odd number (1) of ones. a(3) = 8 because 8 base 10 = 12 base 6, which has an odd number (1) of ones. a(11) = 36 because 36 base 10 = 100 base 6, which has an odd number (1) of ones. a(17) = 43 because 43 base 10 = 111 base 6, which has an odd number (3) of ones.
Programs
-
Maple
isA138103 := proc(n) local a; a := 0 ; for d in convert(n,base,6) do if d = 1 then a := a+1 ; fi ; od: RETURN( a mod 2 = 1) ; end: for n from 1 to 300 do if isA138103(n) then printf("%d,",n) ; fi ; od: # R. J. Mathar, May 13 2008
Extensions
Corrected and extended by R. J. Mathar, May 13 2008
Comments