OFFSET
1,1
COMMENTS
Numbers n such that sum of even digits equals sum of odd digits in A036301.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
2671 is OK because 2+6=7+1.
MAPLE
f:= proc(n) local Lo, Le;
Lo, Le:= selectremove(type, convert(n, base, 10), odd);
abs(convert(Lo, `+`)-convert(Le, `+`))
end proc:
select(t -> f(t) = 0, [seq(ithprime(i), i=1..10000)]); # Robert Israel, Nov 13 2024
MATHEMATICA
soeQ[n_]:=2*Total[Select[(x=IntegerDigits[n]), OddQ[#]&]]==Total[x]; Select[Prime[Range[1050]], soeQ[#]&] (* Jayanta Basu, May 23 2013 *)
Cases[{Total@# &/@GatherBy[IntegerDigits@#, OddQ], #}&/@
Prime@Range@3000, {{x_, x_}, y_} :> y] (* Hans Rudolf Widmer, Jul 26 2024 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Zak Seidov, Nov 01 2002
STATUS
approved