login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A098160 Numbers n with property that when writing down all the natural numbers from 0 to n one uses the same number of even and odd digits. 0

%I #6 Jul 31 2017 10:56:19

%S 1,3,5,7,9,10,28,29,30,48,49,50,68,69,70,88,89,90

%N Numbers n with property that when writing down all the natural numbers from 0 to n one uses the same number of even and odd digits.

%C The sequence seems to stop at 90.

%e [0,1,2,3,4,5,6,7,8,9,10] uses 6 even digits and 6 odd digits.

%t f[n_] := Block[{id = Mod[ Flatten[ Table[ IntegerDigits[i], {i, 0, n}]], 2]}, Length[id] - 2Plus @@ id]; Select[ Range[ 100], f[ # ] == 0 &] (* _Robert G. Wilson v_, Nov 03 2004 *)

%t sneoQ[n_]:=Module[{d=Flatten[IntegerDigits/@Range[0,n]]},2*Count[ d,_?OddQ] == Length[d]]; Select[Range[100],sneoQ] (* _Harvey P. Dale_, Jul 31 2017 *)

%K base,easy,nonn,fini,full

%O 1,2

%A _Eric Angelini_, Oct 25 2004

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 07:27 EDT 2024. Contains 371265 sequences. (Running on oeis4.)