A137469 Numbers with an odd number of 1's in base 5 expansion.
1, 5, 7, 8, 9, 11, 16, 21, 25, 27, 28, 29, 31, 35, 37, 38, 39, 40, 42, 43, 44, 45, 47, 48, 49, 51, 55, 57, 58, 59, 61, 66, 71, 76, 80, 82, 83, 84, 86, 91, 96, 101, 105, 107, 108, 109, 111, 116, 121, 125, 127, 128, 129, 131, 135, 137, 138, 139, 140, 142, 143, 144, 145
Offset: 1
Examples
a(18) = 40 (base 10) is in the sequence because 40 (base 10) = 130 (base 5) which has an odd number (1) of 1's ; whereas 41 is not in the sequence because 41 (base 10) = 131 (base 5) has an even number (2) of 1's.
Programs
-
Maple
isA137469 := proc(n) local a,d ; a := 0 ; for d in convert(n,base,5) do if d =1 then a := a+1 ; fi ; od; RETURN( a mod 2 = 1 ) ; end: for n from 1 to 400 do if isA137469(n) then printf("%d,",n) ; fi ; od: # R. J. Mathar, Apr 21 2008
-
Mathematica
Select[Range[200], OddQ[DigitCount[ #, 5][[1]]] &] (* Stefan Steinerberger, Apr 21 2008 *)
Extensions
More terms from R. J. Mathar and Stefan Steinerberger, Apr 21 2008
Comments